|
WriteFile()
Writes data to a file previously opened by
OpenFile() or
CreateFile().
Syntax
WriteFile(<cFile>, <cData>) -->
lSuccess
Arguments
<cFile> --> is the name of the file to
write data to including path and drive information if
applicable.
<cData> --> is the the data to write to
the file.
Returns
Logical TRUE is returned if writing to the file
was successful. Otherwise logical FALSE if the write attempt
failed.
Description
This function is used to write information to a
binary file. You can only write data to the file if the file was
first opened successfully using either
OpenFile() or
CreateFile().
Once you are finished writing to a file you
must close it using
CloseFile().
Example
If
OpenFile("C:\CAPITAL\Mydata.dat")
WriteFile("C:\CAPITAL\Mydata.dat",
"Hello World.")
CloseFile("C:\CAPITAL\Mydata.dat")
Endif
____________________________
Related Topics
Business
Function List
CloseFile()
IsFileEnd()
OpenFile()
ReadFile()
ReadFileLine()
WriteFileLine()
|