UNIX2DOS

Purpose:

Converts a Unix style text file to Windows/DOS.

Syntax:

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.

Returns:

An integer, 1 if successful. Each linefeed character is converted to carriage return-linefeed pairs used by Windows/DOS.

Example:

unix2dos("myfile.txt");

 

converts each LF to CR-LF pairs.

Remarks:

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.

See Also:

FILESTRREP

STRCHAR, STRCHARS

STRREPLACE