ftp and python

Giampaolo Rodola' gnewsg at gmail.com
Sun Apr 11 14:54:12 CEST 2010


On 8 Apr, 07:24, John Nagle <na... at animats.com> wrote:
> Tim Chase wrote:
> > Matjaz Pfefferer wrote:
> >> What would be the easiest way to copy files from one ftp
> >> folder to another without downloading them to local system?
>
> > As best I can tell, this isn't well-supported by FTP[1] which doesn't
> > seem to have a native "copy this file from server-location to
> > server-location bypassing the client". There's a pair of RNFR/RNTO
> > commands that allow you to rename (or perhaps move as well) a file which
> > ftplib.FTP.rename() supports but it sounds like you want too copies.
>
>     In theory, the FTP spec supports "three-way transfers", where the
> source, destination, and control can all be on different machines.
> But no modern implementation supports that.
>
>                                         John Nagle


pyftpdlib supports it:
http://code.google.com/p/pyftpdlib/wiki/FAQ#What_is_FXP?

...but Python's ftplib.py module doesn't.


--- Giampaolo
http://code.google.com/p/pyftpdlib
http://code.google.com/p/psutil



More information about the Python-list mailing list