File Type |
FTP Transfer Mode |
Why? |
Text files (.txt, .html, .xml, .csv, .css, .js) |
ASCII |
ASCII mode converts line endings properly (especially between Windows/Linux) |
Program source code (.c, .cpp, .py, .java, .php) |
ASCII |
Source code is treated as text, needs consistent line endings |
Web scripts (.pl, .php, .asp) |
ASCII |
Same reason: treated as text files |
Images (.jpg, .png, .gif, .bmp) |
Binary |
Binary mode preserves exact byte sequence (no line ending conversion) |
Videos (.mp4, .avi, .mov) |
Binary |
No changes should be made, pure binary transfer |
Audio files (.mp3, .wav) |
Binary |
Audio data must not be altered during transfer |
Compressed files (.zip, .tar.gz, .rar) |
Binary |
Compression formats require bit-perfect copying |
Database dumps (.sql) |
ASCII (usually) |
Dump files are text — ASCII is safer to avoid corruption |
Executable files (.exe, .bin, .dll) |
Binary |
Must transfer without modification |