Following are some of the common FTP commands for transferring files:
Log in
ftp domain_name
Example: ftp ftp.mycompany.com
Log out
quit, bye
Change Between ASCII and Binary Mode
bin binary transfer
asc ASCII transfer (default)
Transfer Remote to Local
get retrieve single file
mget retrieve multiple files
for example:
get image001.gif
mget *.gif
Transfer Local to Remote
put send single file
mput send multiple files
for example:
put image001.gif
mput *.gif
Note: when transferring multiple files,
start ftp with -i switch, to eliminate
prompts for each file:
ftp -i domain_name
List Files
ls list files (simple)
dir list files (details)
Create/Switch Remote Directories
cd change directory
for example:
cd folderxyz
cd .. go back one directory level
mkdir make new directory
for example:
mkdir folderxyz
rmdir remove directory
for example:
rmdir folderx
pwd print working directory
(where am I?)
Switch Local Directories
lcd change local directory
for example:
lcd \workdir
lcd (back to starting point)
Using lcd by itself takes you
back to the local directory
you started from.