FTP Commands for Windows

List of commonly used FTP commands in the Windows command-line prompt

FTP definition for Windows

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:

  1. Command-line FTP client
  2. Web browser
  3. Graphical FTP clients

The first two are straightforward methods that allow you to directly use a Web browser (such as Google Chrome, Firefox, or 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 you can use to establish an FTP connection. To initiate an FTP connection from Windows, type ftp at the command prompt, and press enter.

FTP commands for Windows command 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.
appendAppend text to a local file.
asciiSwitch to ASCII transfer mode.
bellTurns bell mode on or off.
binarySwitches to binary transfer mode.
byeExits from FTP.
cdChanges directory.
closeExits from FTP.
deleteDeletes a file.
debugSets 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.

disconnectExits from FTP.
getGet file from the remote computer.
globSets 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.
hashSets hash mark printing on or off. When turned on, for each 1024 bytes of data received, a hash-mark (#) is displayed.
helpAccesses the Help screen and displays information about the command if the command is typed after help.
lcdDisplays local directory if typed alone or if path typed after lcd will change the local directory.
literalSends a literal command to the connected computer with an expected one-line response.
lsLists files of the remotely connected computer.
mdeleteMultiple delete.
mdirLists contents of multiple remote directories.
mgetGet multiple files.
mkdirMake directory.
mlsLists contents of multiple remote directories.
mputSend multiple files.
openOpens address.
promptEnables or disables the prompt.
putSend one file.
pwdPrint working directory.
quitExits from FTP.
quoteSame as the literal command.
recvReceive file.
remotehelpGet help from remote server.
renameRenames a file.
rmdirRemoves a directory on the remote computer.
sendSend single file.
statusShows status of currently enabled and disabled options.
traceToggles packet tracing.
typeSet file transfer type.
userSend new user information.
verboseSets verbose on or off.

FTP command-line options for Windows

Command-Line Option

Description of Command

-vSuppresses verbose display of remote server responses.
-nSuppresses auto-login upon initial connection.
-iTurns off interactive prompting during multiple file transfers.
-dEnables debugging, displaying all ftp commands passed between the client and server.
-gDisables filename globbing, which permits the use of wildcard characters in local file and path names.
-s:filenameSpecifies 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 (>).
-aUse any local interface when binding data connection.
-w:windowsizeOverrides the default transfer buffer size of 4096.
computerSpecifies 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.

Safe file sharing

FTP, by itself, isn’t a reliable way to exchange sensitive business information because it’s prone to 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.

SolarWinds® Serv-U® MFT Server is an enterprise-grade software designed to provide comprehensive security, automation, and centralized control over file transfer across the organization. It’s used by leading businesses due to it being built for high security, flexibility, and an easy-to-use interface. Using Serv-U MFT Server, you can make safe file transfers using SFTP, FTPS, and HTTPS over IPv4 and IPv6 networks.

Secure Windows FTP command file sharing

Starts at

Supports unlimited concurrent sessions

Let’s talk it over.

Contact our team. Anytime.