How to Recursively Download Files from FTP You can download complete website recursively using wget command line utility. wget is a frequently used command for downloading files from http and ftp servers. In this tutorial you will learn how to Recursively Download Files from FTP.
For example – below command will download /remote/dir directory and its subdirectory from example.com ftp server.
$ wget -r ftp://ftpuser:email@example.com/remote/dir/
You can define username and password for authenticated ftp server like below example command.
$ wget -r --user="ftpuser" --password="password" ftp://example.com/subdir/
You may used some additional parameters to wget command to use more features in files downloading.
–reject jpg,png – To exclude jpg and png files from downloading.
-nH – avoids the creation of a directory named after the server name
-nc – avoids creating a new file if it already exists on the destination (it is just skipped)
Was this Tutorial helpful? Help others share on Facebook, Twitter, and Google Plus!