Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
FTP download directories
#3
I suggest you use wget instead. 

# download the whole directory 

wget -rpk -l 10 -np -c --random-wait -U Mozilla http://ftp.debian.org/debian/doc
r - recursive download
p - gets not only the HTML files
k - convert the links in a way to be able to use the web pages locally
l - subdirectories level
np - --no-parent directories
c - continue if case network failure or something else. You can run the command again and it will not get the downloaded files again
U - user agent
random-wait - wait until next request 

You can provide the user if login is needed. Add --user=username --ask-password to the options. Do not use --password="" or similar as ftp://user:[email protected]/dir address because it will be in cmd history
You may add -R html htm to discard certain files
-nH - This option will force wget not to create host.com directory
"As they say in Mexico 'dosvidaniya'. That makes two vidaniyas."
https://freedns.afraid.org
Reply


Messages In This Thread
FTP download directories - by Sorkkaelain - Mar-14-2017, 09:35 PM
RE: FTP download directories - by Larz60+ - Mar-15-2017, 12:03 AM
RE: FTP download directories - by wavic - Mar-15-2017, 03:28 AM
RE: FTP download directories - by Larz60+ - Mar-15-2017, 05:57 AM
RE: FTP download directories - by Sorkkaelain - Mar-15-2017, 12:54 PM
RE: FTP download directories - by wavic - Mar-15-2017, 01:08 PM
RE: FTP download directories - by Sorkkaelain - Mar-15-2017, 02:40 PM
RE: FTP download directories - by wavic - Mar-15-2017, 03:54 PM
RE: FTP download directories - by Sorkkaelain - Mar-15-2017, 05:06 PM
RE: FTP download directories - by snippsat - Mar-15-2017, 09:24 PM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020