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.
Need help writing a script? Have any question about ScriptFTP?
Hi.

Is the only criteria for uploading a file from my local directory to my ftp-server the timestamp of the files?

I run a script to backup my Outlook.pst file, and even though the file isn't changed it's always uploaded. Before running the script I stop Outlook with an EXEC command and restart it with an EXEC command when the script is finished. As far as I can see, the timestamp of the file is changed both when stopping and starting Outlook.

But, if i stop Outlook manually before running the script (and don't restart Outlook at the end of the script), I may run the script again and again without the unchanged Outlook.pst file being uploaded.

So, are the size or CRC of the file not calculated to decide if the file needs to be uploaded?

To be able to run the script, the Outlook has to be stopped. If not, I get an error message telling that the file is used by another process (Outlook).

Lars H.
Hi Lars,
So, are the size or CRC of the file not calculated to decide if the file needs to be uploaded?
No, only the file timestamp is used for synchronization. I'd like to use to use the CRC instead but the FTP protocol does not provide a way to get the CRC of a remote file.

The size is not a reliable way. Two file can be the same size and have the same name but the content may be different.
As the file get a new timestamp when I close Outlook, would it be possible to read the timestamp (with GETDATE?) before I close down Outlook and use that timestamp when deciding if the remote file is older than the local? But this isn't a big case. I run the backup every night, and it is very unlike that I haven't sent or received an e-mail since last backup causing the file to change. So thanks for the answer.

Lars H.
Hi Lars,

The GETDATE command is used to get the current date/time. I'll code a new command to retrieve local and remote file properties tomorrow. Something like GETFILEPROPS() that will allow to get remote/local file date and size.

Thanks a lot for your feedback. It's always welcome.
And thanks to you!

It looks that the V.3.2 of ScriptFTB will have a lot of new features. For the moment I'm using your latest build. I hope that you will update the scripting guide as well when you release V.3.2

Lars H.