[Tutor] help with ftplib and file modification date

Kent Johnson kent37 at tds.net
Tue Mar 17 01:11:31 CET 2009


On Mon, Mar 16, 2009 at 6:27 PM, Rene Bourgoin <rb2.net at gmail.com> wrote:
> i'm doing a simple upload to an FTP server using the ftplib module and
> wanted to know how i can preserve the file modification date all the way
> through the process. I lose the file mod date because i read the original
> file then ftp writes a new file to the server which changes the mod date
> to the time and date of the file transfer.

Apparently there is no standard way to do this but some servers
support using the MDTM command to set time stamps:
http://forum.filezilla-project.org/viewtopic.php?f=1&t=4122

Kent


More information about the Tutor mailing list