[Tutor] ftplib: retrbinary all files in directory
Rich Krauter
rmkrauter at yahoo.com
Wed Jun 1 01:04:51 CEST 2005
Israel Carr wrote:
> I'm using ftplib to connect to a server, and I want to grab every file
> from a specific folder. The filenames change frequently. What is the
> best way to use retrbinary with wildcards(or some better option) to
> transfer all files?
>
> Thanks,
> Israel
>
> _______________________________________________
> Tutor maillist - Tutor at python.org
> http://mail.python.org/mailman/listinfo/tutor
>
You can try ftpmirror.py, which is included with python.
From http://docs.python.org/lib/module-ftplib.html:
"""
The file Tools/scripts/ftpmirror.py in the Python source distribution
is a script that can mirror FTP sites, or portions thereof, using the
ftplib module. It can be used as an extended example that applies this
module.
"""
Good luck.
Rich
More information about the Tutor
mailing list