ftplib with unknown file names
zanesdad at bellsouth.net
Mon Jan 10 19:13:37 CET 2005
> How can I use ftplib to retrieve files when I do not know their names?
> I can do this to get a listing of the directory's contents:
> The output from this goes to the console and I can't figure out how to
> turn that into something I can use to actually get the files (like a
> list of file names). I read a bit about the callback function that can
> be passed to retrlines but I couldn't figure out how to use it.
> Any help is appreciated.
<ftp object>.nlst(argument) will return a list of file names. Here are
the docs for the nlst command:
More information about the Python-list