Convert Text File Formats (Line Terminators)Author: Carl Sassenrath If you have a text file that does not have the correct line terminators for your computer, this code will convert it.
This code works because the READ function converts a text file to the standard REBOL string format. The WRITE function then converts the text back to the format used by the local computer.
This code will convert all the text files found in your current directory:
You can add additional file suffixes if necessary. (Just be sure they are for text files. If you use this code on binary files, they will be corrupted.) |