yogi21 Posted April 20, 2003 Posted April 20, 2003 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 Quote
Guest mutant Posted April 20, 2003 Posted April 20, 2003 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() Quote
Moderators Robby Posted April 20, 2003 Moderators Posted April 20, 2003 You should be using IO.StreamWriter in .NET [edit]D'oh, Mutant's up early. :)[/edit] Quote Visit...Bassic Software
LiquidEnforcer Posted April 27, 2003 Posted April 27, 2003 Just want to point out that if u werent using .NEt you could have used Print() Quote
Moderators Robby Posted April 27, 2003 Moderators Posted April 27, 2003 I'm quite convinced that he is using .NET :) Quote Visit...Bassic Software
LiquidEnforcer Posted April 27, 2003 Posted April 27, 2003 I know, ;) Just wanted to throw it out there. Quote
*Gurus* divil Posted April 27, 2003 *Gurus* Posted April 27, 2003 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 ;) Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
LiquidEnforcer Posted April 27, 2003 Posted April 27, 2003 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* ;) Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.