DADiSP Worksheet Functions > Function Categories > File Manipulation > UNIX2DOS
Converts a Unix style text file to Windows/DOS.
UNIX2DOS("infile", "outfile")
"infile" |
- |
A string, the name of the file to convert. |
"outfile" |
- |
Optional. A string, the name of the output file. Defaults to infile. |
An integer, 1 if successful. Each linefeed character is converted to carriage return-linefeed pairs used by Windows/DOS.
unix2dos("myfile.txt");
converts each LF to CR-LF pairs.
Text files produced under Unix systems often use a single linefeed character (10) to indicate a new line. Windows systems use carriage return-linefeed pairs (13 10).
See FILESTRREP to replace a pattern string with a new string in one or more files.