File Download with FTP Command-Line Tool on Windows

Q

How to download a file with the FTP command-line tool on Windows?

✍: FYIcenter.com

A

Downloading files from a FTP server is easy with the FTP command-line tool on Windows. Use "dir" and "cd" commands to navigate to the directory where the file is located. Then use the "get" command to download the file.

See the example below:

ftp> open space.mit.edu
Connected to space.mit.edu.
220-space.mit.edu NcFTPd Server (free educational license) ready.
220-
220- This server is operated by the MIT Center for Space Research.
220- Only anonymous FTP access is allowed to this server.  Use the
220- login Name `ftp', and use your e-mail address for the password.
220-
User (space.mit.edu:(none)): ftp
331 Guest login ok, send your complete e-mail address as password.
Password: (Press Enter here)
230 Logged in anonymously.

ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
drwxr-xr-x   3 ftpuser  ftpusers       512 Dec 31  2003 archive
dr-xrwxrwx   4 ftpuser  ftpusers       512 Oct 10 23:10 incoming
drwx------   2 ftpuser  ftpusers      8192 Jan  2  2004 lost+found
drwxrwxrwx   3 ftpuser  ftpusers       512 Aug  9 23:10 outgoing
drwxr-xr-x  30 ftpuser  ftpusers      1024 Sep  2 09:00 pub
lrwxrwxrwx   1 ftpuser  ftpusers        11 Nov 20  2011 src -> archive/src
226 Listing completed.
ftp: 402 bytes received in 0.00Seconds 402000.00Kbytes/sec.

ftp> cd pub
250 "/pub" is new cwd.
ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
drwxrwxr-x   6 ftpuser  ftpusers       512 Jun 27  2012 ASC
lrwxrwxrwx   1 ftpuser  ftpusers         3 Nov 20  2011 CXC -> ASC
drwx------   2 ftpuser  ftpusers       512 May  2  2016 OLD
drwxrwxr-x   7 ftpuser  ftpusers       512 Feb  3  2004 WH2001
drwxrwxr-x   2 ftpuser  ftpusers      1024 Oct 19 14:09 cgrant
lrwxrwxrwx   1 ftpuser  ftpusers         3 Nov 20  2011 cxc -> ASC
drwxr-xr-x   8 ftpuser  ftpusers       512 Feb  3  2004 davis
drwxr-xr-x   2 ftpuser  ftpusers       512 Sep  1  2005 deepto
drwxr-xr-x   2 ftpuser  ftpusers       512 Nov  2  2011 dph
drwxrwxr-x   4 ftpuser  ftpusers       512 Jul 15  2014 fkb
drwxrwxr-x   2 ftpuser  ftpusers       512 Jul 24  2012 gea
drwxrwxrwx   2 ftpuser  ftpusers       512 Feb 13  2013 grr
...

ftp> cd davis
250 "/pub/davis" is new cwd.

ftp> dir
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
-rw-r--r--   1 ftpuser  ftpusers       537 Aug 11  1995 VMS.readme
-rw-r--r--   1 ftpuser  ftpusers     10175 Apr 26  2000 acsite.m4
drwxr-xr-x   6 ftpuser  ftpusers       512 Dec 13  2009 jed
drwxr-xr-x   6 ftpuser  ftpusers      2560 Sep 24  2013 misc
drwxr-xr-x   3 ftpuser  ftpusers      1024 Sep 25  2008 most
drwxr-xr-x  10 ftpuser  ftpusers       512 Mar 16  2012 slang
drwxr-xr-x   3 ftpuser  ftpusers       512 Dec 21  2012 slrn
drwxr-xr-x   2 ftpuser  ftpusers       512 Feb 28  2004 slsc
226 Listing completed.
ftp: 685 bytes received in 0.00Seconds 685000.00Kbytes/sec.

ftp> get VMS.readme
200 PORT command successful.
150 Opening ASCII mode data connection for VMS.readme (537 bytes).
226 Transfer completed.
ftp: 554 bytes received in 0.00Seconds 554000.00Kbytes/sec.

 

Using FTP Command Tool on Windows

⇒⇒FTP - Frequently Asked Questions

2016-12-08, 428👍, 0💬