Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hey

i want to write simple text data to a file. the only problem i have is that in the file all the inserted data is put in quotation marks. i used this code:

FileOpen(1, "c:\java\test1.bat", OpenMode.Output)

WriteLine(1, "@echo off")

WriteLine(1, "cd\")

WriteLine(1, "java -cp c:\java waveplay " + javastring)

WiteLine(1, "cd\")

FileClose(1)

The output is this:

"@echo off"

"cd\"

"java -cp c:\java waveplay "

"cd\"

 

what can i do that the quotation marks will not be stored.

thanx a lot

yogi

Guest mutant
Posted

Use StreamWriter which is the correct .NET way of writing to files:

 

Dim writ as new IO.StreamWriter("pathtofile")
writ.WriteLine("whatever you wish to write")
writ.Flush()
writ.Close()

Posted

Err, doh...I know that. ;) But Since he was obviously using an older method I just thought Id say that if he used Print it wouldnt put the quotes. I mention this because before I got .NET I had the same problem and it was a frustrating thing.

 

*Hides* ;)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...