writing to a file

yogi21

Member
Joined
Apr 14, 2003
Messages
6
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
 
Use StreamWriter which is the correct .NET way of writing to files:

Code:
Dim writ as new IO.StreamWriter("pathtofile")
writ.WriteLine("whatever you wish to write")
writ.Flush()
writ.Close()
 
And if he was using LOGO, he could use a series of movement and pen commands to get the turtle to draw the string on a piece of paper!

This is a .NET forum, LiquidEnforcer ;)
 
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* ;)
 
Back
Top