Archived Forum Post

Index of archived forum posts

Question:

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.


Answer

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.


Answer

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


Answer

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

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


Answer

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