ftp and python

John Nagle nagle at animats.com
Thu Apr 8 07:24:21 CEST 2010


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



More information about the Python-list mailing list