WRITEFILE Write string to specified text file |
Top Previous Next |
This script command writes characters to the specified text file. This command is oriented toward writing a complete record of printable characters, terminated by a carriage-return/ line-feed, to a file. The scope of this command (and the READFILE command) is not to provide full function file I/O to your script files, but rather to provide temporary storage for small amounts of information for use by a script file or an external program.
By default WRITEFILE either creates a new file or over-writes an existing file with what is written. You may use the /append option to add records to an existing file.
Consider the following example.
;; write a string supplied by an operator to a file PROMPT user_id "Enter your Used ID" WRITEFILE "user_info.txt" user_id /append
Note: The %crlf internal variable is available for adding additional line breaks to your output string.
Related Command(s): READFILE, WORKINGDIR,MAKEFILENAME, MAKEDIR, COPY, RENAME, DELETE, APPEND See also: %crlf |