Typing out ftp commands each time is error prone and no fun. Here’s an easy way to list all the commands in a text file and supply them sequentially to the ftp command.
Here’s a sample
open servername username password prompt cd /path/to/folder ls close bye
prompt in there turns off prompt mode so commands such as
mget aren’t stuck waiting for user confirmation.
Transmitting non-text files
There are two modes of file transfer.
- ASCII- this only works for text because it assumes everything in the file can be encoded using ASCII characters
- Binary- uses more bytes to transfer but works for any type of files.