FTP (File Transfer Protocol) is a standard network protocol used to exchange files between computers on a private network or through the Internet.
There are three ways in which FTP is commonly accessed:
The first two are straightforward methods that allow you to directly use a Web browser (such as Google Chrome, Firefox, Internet Explorer) or an FTP client application (such as FTP Voyager®) to connect to the FTP server to exchange files. Using the command-line interface, you need to enter a set of commands to send or receive files from other computers.
Windows, Mac OS X, and Linux operating systems have built-in command-line clients that can be used for establishing an FTP connection. To initiate an FTP connection from Windows, type ftp at the command prompt, and press enter.
Here is a list of the most commonly used FTP commands in the Windows command-line prompt.
|FTP Command||Description of Command|
|!||This command toggles back and forth between the operating system and ftp. Once back in the operating system, typing exit takes you back to the FTP command line.|
|?||Accesses the Help screen.|
|append||Append text to a local file.|
|ascii||Switch to ASCII transfer mode.|
|bell||Turns bell mode on or off.|
|binary||Switches to binary transfer mode.|
|bye||Exits from FTP.|
|close||Exits from FTP.|
|delete||Deletes a file.|
|debug||Sets debugging on or off.|
|dir||Lists files, if connected.
dir -C = lists the files in wide format.
dir -1 = Lists the files in bare format in alphabetic order.
dir -r = Lists directory in reverse alphabetic order.
dir -R = Lists all files in current directory and sub directories.
dir -S = Lists files in bare format in alphabetic order.
|disconnect||Exits from FTP.|
|get||Get file from the remote computer.|
|glob||Sets globbing on or off. When turned off, the file name in the put and get commands is taken literally, and wildcards will not be looked at.|
|hash||Sets hash mark printing on or off. When turned on, for each 1024 bytes of data received, a hash-mark (#) is displayed.|
|help||Accesses the Help screen and displays information about the command if the command is typed after help.|
|lcd||Displays local directory if typed alone or if path typed after lcd will change the local directory.|
|literal||Sends a literal command to the connected computer with an expected one-line response.|
|ls||Lists files of the remotely connected computer.|
|mdir||Lists contents of multiple remote directories.|
|mget||Get multiple files.|
|mls||Lists contents of multiple remote directories.|
|mput||Send multiple files.|
|prompt||Enables or disables the prompt.|
|put||Send one file.|
|pwd||Print working directory.|
|quit||Exits from FTP.|
|quote||Same as the literal command.|
|remotehelp||Get help from remote server.|
|rename||Renames a file.|
|rmdir||Removes a directory on the remote computer.|
|send||Send single file.|
|status||Shows status of currently enabled and disabled options.|
|trace||Toggles packet tracing.|
|Type||Set file transfer type.|
|user||Send new user information.|
|verbose||Sets verbose on or off.|
Command-line options (also known as options, flags, or switches), are used to modify the operation of an FTP command. A command-line option typically follows the main FTP command after a space. Here’s a list of the most commonly used FTP command-line options for Windows.
|Command-Line Option||Description of Command|
|-v||Suppresses verbose display of remote server responses.|
|-n||Suppresses auto-login upon initial connection.|
|-i||Turns off interactive prompting during multiple file transfers.|
|-d||Enables debugging, displaying all ftp commands passed between the client and server.|
|-g||Disables filename globbing, which permits the use of wildcard characters in local file and path names.|
||Specifies a text file containing ftp commands; the commands automatically run after ftp starts. No spaces are allowed in this parameter. Use this switch instead of redirection (>).|
|-a||Use any local interface when binding data connection.|
|-w:windowsize||Overrides the default transfer buffer size of 4096.|
|computer||Specifies the computer name or IP address of the remote computer to connect to. The computer, if specified, must be the last parameter on the line.|
Given the availability of numerous graphical FTP clients, the text-based FTP client built into Windows and Mac OS X operating systems is a reliable tool for testing and troubleshooting. Learning these commands helps you exchange files between computers without installing additional software.
FTP, by itself, is not a reliable way to exchange sensitive business information because it is prone to security attacks. Due to the limitations of FTP, organizations generally use FTPS and SFTP protocols for file transfer. The technology of managed file transfer (MFT) supports these high-security protocols and replaces basic FTP and other ad hoc file transfer solutions. Serv-U® MFT Server is an enterprise-grade software that provides comprehensive security, automation, and centralized control over file transfer across the organization. It is widely preferred by leading businesses due to its high security, flexibility, and easy-to-use interface. Using Serv-U MFT Server, you can make secure file transfers using SFTP, FTPS, and HTTPS over IPv4 and IPv6 networks.
For a list of commonly used Linux and UNIX FTP commands, click here.
Secure FTP server software that provides comprehensive security, automation, and centralized control for file transfers across your organization