On 6 Mar, 18:46, Anders Eriksson <[EMAIL PROTECTED]> wrote: > Hello, > > I need to list all the files on myFTPaccount (multiple subdirectories). I > don't have shell access to the account. > > anyone that has a program that will do this? > > // Anders > -- > English is not my first, or second, language > so anything strange, or insulting, is due to > the translation. > Please correct me so I may improve my English!
If you mean listing ALL files including those contained in sub directories if the server supports globbing you can issue a "STAT *" command and receive the list of all files on the command channel in an "ls -lR *"-like form. Not tested: >>> import ftplib >>> f = ftplib.FTP() >>> f.connect('ftpserver.domain', 21) >>> f.login() >>> f.sendcmd('STAT *') an "ls -lR *" is expected to come -- http://mail.python.org/mailman/listinfo/python-list