ftp automation

ScriptFTP

The professional tool to automate FTP, SFTP, FTPS and schedule FTP batch jobs

The forum is now read only. Please, go to the the main ScriptFTP website if you need help.
Post a message here if you find anything wrong in ScriptFTP.
Hi

I've set up a script to sync a local folder with some of our clients FTPs, so that updated files uploaded by clients are automatically downloaded. I was having problems with the modified times being different to the FTP once they were downloaded, so used the following to adjust
Code: Select allgetlist ($list,remote_files,"*.*") foreach $item in $list     $time=getfiletime(REMOTE,$item)     setfiletime(local,$item,$time) end foreach
This worked fine for one of our client's FTP site, but is not working for another.

To establish where the error was occuring, I used the following:
Code: Select all$time=getfiletime(remote,"client_filename") print ($time)
The following shows, for 3 randomly chosen files, the printed $time followed by the modification time as seen in windows explorer
"2009_09_10-15_11_00" appears in explorer as 15/10/2009 12:00
"2009_09_10-09_16_44" appears in explorer as 09/10/2009 17:44
"2009_09_11-02_16_15" appears in explorer as 02/11/2009 16:15

Is there a way of altering the format that $time is received/interpreted? (a bit like GETTIME(format))

Thanks for any help
Bob
Hello,

What are the OSes of each FTP site ?

Thanks.

Zythan
Hi

The one that works is XP. I'm reasonably confident that the one that isn't working is Unix (I can't find out as it's a clients FTP and they get a bit jumpy if I start asking questions - unless there is another way of finding out?).

Cheers
Bob
I have tested the way SETFILETIME works and got the same problem. It seems that ScriptFTP is converting local times to UTC times (adding one hour in your case). The problem is also that some FTP server report file modification times in local time and others report them in UTC times. A complete mess ;) . I will try to have the fix tomorrow.

I will move this forum thread to the Bug reports subforum and leave a shadow topic in Troubleshooting.