loudinbk
asked on
Convert EOL character (UNIX to PC)
What is the easiest way to convert every EOL character in a ascii file. I need to convert from a Line Feed (Unix Style) to a Carriage Return + Line Feed (PC Style).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That print should end in a semicolon:
Print #ff, s;
Print #ff, s;
Obviously this is not ideal if you'll be doing this on many files or on a regular basis.
Also, the way I prefer in EDDYKT's code is to replace the Get with Input:
...
Open fileName For Binary As #ff
s = input$(lof(ff), #ff)
Close ff
...
Same result.
Also, the line:
Print #ff, s
should be
Print #ff, s
to prevent a new CRLF from appearing at the end of the document.