FTP a folder with wget

You can easily use wget to FTP your files. The command below FTP’s a complete directory structure to your local machine.

wget -r -nH ==cut-dirs=4 ftp://[username]:[password]ftp.svr.nl/webspace/httpdocs/site1.nl

 

The above command retrieves all files with the folder webspace/httpdocs/site1.nl . The -nH  options makes sure that there is no folder ftp.svr.nl is created. The –cut-dirs=3  options removes 3 (webspace, httpdocs and site1.nl) folders from the remote directory structure and re-creates the structure local (excluding the 3 levels) local.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *