Walker News

Using Wget To Recursively Download Folders From FTP Server With Login And Password

Question: How to automate a Linux shell script (or Windows batch file) to recursively download a folder via FTP server that requires login ID and password?

Answer: Uses wget, a non-interactive command-line program available in both Linux/UNIX and Windows platform, that can login FTP server and perform recursive download for a directory.

Example: Login to FTP server as walker using password dotnet, to download the whole folder content of mybackup (which contains a bunch of files and sub-directories). In this case, the wget syntax is as this:
wget -r ftp://walker:'dotnet'@*

You can also use wget option switch for specifying login ID and password, e.g.:
wget --user=walker --password='dotnet' -r*

1. The use of asterisk is a MUST to indicate all files and folders.
2. The login password must be enclosed by single quote character.

Custom Search

2018  •  Privacy Policy