SKulibin
SKulibin

Reputation: 749

How to set file modification time via ftp with python

How to change a modification time of file via ftp?

Any suggestions? Thanks!

Upvotes: 0

Views: 437

Answers (2)

Russell Hankins
Russell Hankins

Reputation: 1176

According to FileZilla, the command is MFMT:

The syntax of the MFMT command is:

mfmt = "MFMT" SP time-val SP pathname CRLF

As with all FTP commands, the "MFMT" command label is interpreted in a case insensitive manner.

The "time-val" specifies the last modification time to be applied to the object.

The "pathname" specifies an object in the NVFS.

The server-PI MUST respond to the MFMT command with a 213 reply, or an error response if the object does not exist, the last modification time could not be modified, or some other error has occurred.

This question has more details.

Upvotes: 2

SKulibin
SKulibin

Reputation: 749

This is impossible

"The original FTP specification and recent extensions to it do not include any way to preserve the time and data for files uploaded to a FTP server."

Upvotes: 0

Related Questions