FTP files from Unix to Windows and get double lines

Sometimes, but not always, you’ll download a file from a Unix server to your Windows workstation, only to find that all line breaks have been doubled! This consistently happens to me when downloading WordPress theme files that have been edited using the WordPress theme editor (thus modified by the server).

The FTP client can have its default transfer type set to ASCII, Binary, or Auto. The problem seems to be resolved by setting it to Binary. If that doesn’t work, try ASCII.

But maybe the damage has already been done. Maybe it’s been downloaded and uploaded multiple times, so now the extra lines are part of the real file. Many IDEs have a tool to apply source formatting. For example in Dreamweaver, Commands->Apply Source formatting.

There are many ways/tools to remove blank lines. A quick and easy online tool may be just what you need:
http://textmechanic.com/Remove-Empty-Lines.html

Leave a Reply

Your email address will not be published.