Author |
Message |
Loril
Joined: 21 Feb 2007 Posts: 82
|
|
SyncFtpDir |
|
We are trying to use the SyncFTPDir command to download files from an FTP folder to a local one. Since the FTP server is SFTP and therefore the "Preserve File Times" property cannot be used with FTPConfig, how does the command update files properly?
|
|
Thu Jan 27, 2011 1:16 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7854
|
|
|
|
"Preserve File Times" makes sense for uploading files only. FTP protocol allows changing time of remote files, SFTP doesn't..
For local files, their time can be always changed, no additional options are required for that.
Hope this helps.
|
|
Thu Jan 27, 2011 3:22 pm |
|
|
Loril
Joined: 21 Feb 2007 Posts: 82
|
|
|
|
I guess my question is, if the FTP server shows a file with a timestamp of 1/27/2011 6am (whichever timezone our vendor is in) and the scheduler downloaded the file to our local server with file timestamp of 1/27/2011 11am PST, will the scheduler still be able to "synch" properly if the vendor uploaded an updated file at 1/27/2011 10am, four hours later?
|
|
Thu Jan 27, 2011 3:39 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7854
|
|
|
|
I guess so, that's what SyncFTPDir is for..
If I get your example correctly, after the first synch, the local file time should be set to 1/27/2011 6am to match the time of the file on FTP site. On the next run 4 hours later, the file time on FTP site should appear as 1/27/2011 10am. That time is older than 6am and the process should pick it again and update the local file.
|
|
Thu Jan 27, 2011 4:15 pm |
|
|
Loril
Joined: 21 Feb 2007 Posts: 82
|
|
|
|
So you are saying I should modify the file datetime on the local server after the download? How would I be able to set the file datetime to an earlier time? Is there a command to do that on the scheduler? Let me know. Thanks.
|
|
Thu Jan 27, 2011 9:41 pm |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7854
|
|
|
|
That should be done automatically by SyncFTPDir.
Have you tried that? If that doesn't happen, there is an issue with SyncFTPDir not being able to read remote file time.
|
|
Thu Jan 27, 2011 10:42 pm |
|
|
Loril
Joined: 21 Feb 2007 Posts: 82
|
|
|
|
Yes, I ran the SyncFTPDir command and noticed that the local file datetime was set to the download time in our timezone. If our vendor has a different timezone as in my example, would SyncFTPDir still be able to update files properly?
|
|
Fri Jan 28, 2011 11:40 am |
|
|
SysOp
Site Admin
Joined: 26 Nov 2006 Posts: 7854
|
|
|
|
I'm not sure what to tell you. SyncFTPDir sees file time on the FTP as returned by the server. If the server returns UCT time, changes in timezone should be irrelevant. If the server returns local time, changes in timezone can cause problems if the process is not thought through.
Can you try running SyncFTPDir one more time to verify how SyncFTPDir reacts to file changes on your FTP server?
|
|
Sat Jan 29, 2011 10:34 am |
|
|
|