Writing text to a file
Blitz3D Forums/Blitz3D Beginners Area/Writing text to a file
| ||
| Can someone help me, I am trying to write plain text to a file, I am trying to write a ".bat" file. thanks ToXic. |
| ||
This came from the help file
; Reading and writing a file using ReadLine$ and WriteLine functions
; Initialise some variables for the example
String1$ = "Line 1 is short"
String2$ = "Line 2 is a longer line but they can be much longer"
String3$ = "Line 3 is made up "
String4$ = "of two parts joined together."
; Open a file to write to
fileout = WriteFile("c:\mydata.txt")
; Write the information to the file
WriteLine( fileout, String1 )
WriteLine( fileout, String2 )
WriteLine( fileout, String3 + String4)
WriteLine( fileout, "Just to show you don't have to use variables" )
; Close the file
CloseFile( fileout )
End
|
| ||
| thanks assari, Hmm I need to spend more time with the help files. thanks again. ToXic. |