FTP adds white space after every line of code

It seems to happen randomly when I upload a file via FTP (Filezilla) and then transfer it back again to my computer later, it adds line breaks after every line of code. Drives me nuts looking at the code this way.

I thought perhaps it was because of a change in computer environments or opening the file in a different program than it was originally created but I haven’t changed anything this time around. The file was created with Notepad++ and reopened with Notepad++ yet the FTP still adds stinking line breaks after each line of code.

Anyone have any idea why it’s doing that and, more importantly, how I can fix it?

I just tried changing the transfer type from Auto to ASCII and Binary. The Binary transfer type worked (ASCII still transferred the files with line breaks).

Windows use a CR/LF for the end of a line and Linux uses just a LF. The extra lines are added when you upload a text file from a Windows computer to a Linux computer(server probably) in binary mode, and download it back to the Windows computer in ASCII mode.

Right on. Thanks for the head’s up on that, ewizz.

np, if you use windows then download filezilla, it will automatically detect file type and transfer it correctly :slight_smile: