Archived Forum Post

Index of archived forum posts


Date of copied file changes to Current !!

Jul 18 '13 at 10:29

One urgent requirement. The DateTime on the uploaded file is set to current DateTime after ckftp2_AsynPutFileStart() . I want the local file date to be retained on remote server too.


You can try using SetRemoteFileDateTime, SetRemoteFileDateTimeString or SetRemoteFileDt to set the remote file datetime after uploading it. Note that not all FTP servers support setting a remote file date, so the call will fail in this case.


Here's what the documentation says about SetRemoteFileDateTimeStr (note that this is the ActiveX documentation, but the details should be the same for other versions):

Sets the last-modified date/time of a file on the FTP server. The dateTimeStr should be a date/time string in RFC822 format, such as "Tue, 25 Sep 2012 12:25:32 -0500".

*Important: Not all FTP servers support this functionality.*

Here's a Chilkat blog post that might be of interest too


(Just for your Information) Below log from Server. Did AsyncGet correctly, but said File not found for SetRemoteFileDateTimeStr Note: both RemoteFileNames parameter are same and lines are consecutive.

(000102)18/07/2013 19:14:37 PM - ics (> PASV (000102)18/07/2013 19:14:37 PM - ics (> 227 Entering Passive Mode (192,168,0,22,192,237) (000102)18/07/2013 19:14:37 PM - ics (> RETR a.txt (000102)18/07/2013 19:14:37 PM - ics (> 150 Connection accepted (000102)18/07/2013 19:14:38 PM - ics (> 226 Transfer OK (000102)18/07/2013 19:14:38 PM - ics (> MDTM a.txt (000102)18/07/2013 19:14:38 PM - ics (> 213 20130718123754

(000102)18/07/2013 19:14:55 PM - ics (> MDTM 20130717061010 a.txt (000102)18/07/2013 19:14:55 PM - ics (> 550 File not found (000102)18/07/2013 19:14:55 PM - ics (> SITE UTIME 20130717061010 a.txt (000102)18/07/2013 19:14:55 PM - ics (> 504 Command not implemented for that parameter


Googled further and decided it is best I upload the Tree file of local datetime stamps and use that later for Sync. Thanks.