What's wrong with this program

Kemp Randy-W18971 Randy.L.Kemp at motorola.com
Tue Jul 3 16:12:08 EDT 2001


Thanks.  I'll try it, unless someone has a better idea.

-----Original Message-----
From: Oleg Broytmann [mailto:phd at phd.fep.ru]
Sent: Tuesday, July 03, 2001 3:05 PM
To: Kemp Randy-W18971
Cc: 'python-list at python.org'
Subject: RE: What's wrong with this program


On Tue, 3 Jul 2001, Kemp Randy-W18971 wrote:
> Thanks for the correction.

   Actually I think you don't need ftp.connect() at all - it is called in
ftp.__init__...

> Anyone know the correct format to transfer files
> from one server directory to another server directory?

   I don't know - I've never used ftplib, but the idea is obvious: put it
one by one. Something like this:

for filename in somelist:
   ftp.storbinary("STOR " + filename, open(filename, 'rb'))

Oleg.
----
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.




More information about the Python-list mailing list