MS Windows command line FTP client

This tutorial will show you how the command line FTP client included in the latest Windows distributions can be used. It is useful when you do not have installed GUI (Graphic User Interface) FTP client.

In this tutorial you will need FTP hostname and login information which can be gathered from your hosting provider.

To use the client you will need to open a shell. Click on your Windows Start button > Run, then type: ‘cmd’ and click OK.

MS Windows command line FTP client

At the command prompt type ‘ftp’ yourdomian.tld or the IP address of the remote host.
Enter your User name and password and hit Enter. The attempt is successful if you receive ‘230 User logged in.‘ message.

MS Windows command line FTP client

Here are some of the often used command line FTP commands listed in alphabetical order.

ftp> ?
Displays descriptions for ftp commands. ? is identical to help.

Usage:? {command}

Parameters explanation:
command – Specifies the name of the command about which you want a description. If command is not specified, ftp displays a list of all commands.
—–

ftp> bye
Ends the FTP session with the remote host and exits ftp.

Usage:bye
—–
ftp> cd
Changes the working folder on the remote host.

Usage:cd remote-folder

Parameters explanation:
remote-folder – Specifies the folder on the remote host to change to.
—–
ftp> close
Ends the FTP session with the remote server and returns to the command interpreter.

Usage:close
—–
ftp> delete
Deletes a single file on a remote host.

Usage:delete remote_file

Parameters explanation:
remote_file – Specifies the file to delete.
—–
ftp> dir
Displays a list of a remote folder”s files and subdirectories.

Usage:dir {remote-folder} {local-file}

Parameters explanation:
remote-folder – Specifies the folder for which you want to see a listing. If no folder is specified, the current working folder on the remote host is used.
local_file – Specifies a local file to store the listing. If not specified, output is displayed on the screen.
—–
ftp> disconnect
Disconnects from the remote host, retaining the ftp prompt.

Usage:disconnect
—–
ftp> get
Copies a remote file to the local .

Usage:get remote_file {local-file}

Parameters explanation:
remote_file
Specifies the remote file to copy.
local-file
Specifies the name to use on the local host. If not specified, the file is given the remote_file name.
—–
ftp> help
Displays descriptions for ftp commands.

Usage:help {command}

Parameters explanation:
command – Specifies the name of the command about which you want a description. If command is not specified, ftp displays a list of all commands.
—–
ftp> ls
Displays an abbreviated list of a remote folder”s files and subdirectories.

Usage:ls {remote-folder} {local-file}

Parameters explanation:
remote-folder – Specifies the folder for which you want to see a listing. If no folder is specified, the current working folder on the remote host is used.
local_file – Specifies a local file to store the listing. If not specified, output is displayed on the screen.
—–
ftp> open
Connects to the specified FTP server.

Usage:open host {port}

Parameters explanation:
host – Specifies the remote host to connect to. Host can be specified by IP address or host name (a DNS or HOSTS file must be available). If auto-login is on (default), FTP also attempts to automatically log the user in to the FTP server (see Ftp command-line options to disable auto-login).
port – Specifies a port number to use to contact an FTP server.
—–
ftp> put
Copies a local file to the remote host .

Usage:put local_file {remote_file}

Parameters explanation:
local_file – Specifies the local file to copy.
remote_file – Specifies the name to use on the remote host. If not specified, the file is given the local_file name.
—–
ftp> pwd
Displays the current folder on the remote host.

Usage:pwd
—–
ftp> quit
Ends the FTP session with the remote host and exits ftp.
Usage:quit
—–
ftp> remotehelp
Displays help for remote commands.

Usage:remotehelp {command}

Parameters explanation:
command – Specifies the name of the command about which you want help. If command is not specified, ftp displays a list of all remote commands.
—–
ftp> rename
Renames remote files.

Usage:rename filename newfilename

Parameters explanation:
filename – Specifies the file you want to rename.
newfilename – Specifies the new filename.
—–
ftp> rmdir
Deletes a remote folder.

Usage:rmdir folder

Parameters explanation:
folder – Specifies the name of the remote folder to delete.
—–

Filed Under: Windows Command Line FTP

Anthony Gee About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the Onlinehowto.net website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Leave a Reply