Archived Forum Post

Index of archived forum posts


Preserve date time of uploaded files in FTP2

Jun 16 '14 at 17:13


I´m trying the FTP2 software to write an sync local/ftp files. We have any way to maintain the same date+time of uploaded files? I saw that SFTP has a PreserveDate option, does the FTP2 have some option like that?

Sorry by my english! :)

Thanks, Fabio

Accepted Answer

Chilkat does not automatically do it for two reasons:

  1. Some FTP servers do not support the ability for the client to set the last-modified date/time for a file on the server.
  2. Some applications may not want to preserve the date/time.

Chilkat's decision was to let the programmer decide if the extra step for setting the date/time should be taken.

To preserve the date/time, you may call one of the following methods after doing the upload: SetRemoteFileDateTime, SetRemoteFileDateTimeStr, or SetRemoteFileDt.