Discussion Locked

DOS Carriage Return/Line Feed

0 helpful
5 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
I am told that a DOS file that I am attempting to submit is missing the carriage return and line feeds. How can I verify they are missing and how can I insert them?

5 replies

by dryflies

There are two ways. But first make a copy of the file incase one of these does not work.
The easiest is to open the file in notepad, hit the enter key, and then save the file. Make sure you use save, not save as.
The second method would be to open the file in a binary editor and insert the carriage return and line feed at the approrpiate place. to do that you would insert a 0x0d followed by a 0x0a. these represent the ascii codes for carriage return and line feed respectively. in decimal they are the numbers 13 and 10.

by ahar

get the vim Editor at www.vim.org
there you can set the fileformat to dos, unix or mac
IMHO vim is the allpurpose editor for (almost) all platforms especially for developers

This discussion is closed to new replies.