Posted: 2016-09-14 08:53
I'm trying to optimize a WinSCP script that executes a
Since the whole script is executed as part as a continuous integration build, it might happen that the source code could be
I was wondering if I could implement some custom action to compare the MD5/SHA hash of target and source file, and upload it if the content has changed (the size isn't reliable... it might happen that a code file may weight the same bytes but it may also contain other code...).
Or, is there any built-in feature I could use out-of-the-box?
Thank you in advance[/code]
Location: The Netherlands
Posted: 2016-09-14 14:06
I have never used this with synchronize, but what I have done in the past is upload an script file and digest file to checks the checksum and then download the results. I calculated the checksum on the local files to see if everything was the same.
E.g. the scriptfile was something like this
/usr/bin/sha1sum -c "/path/to/dir/filelist.digest" 2>&1 > "results.check"
using the call command I ran this script on the other side.
Of course, you need to be able to run things on the other side for this to work.
Location: Prague, Czechia
WinSCP does not support this, as actually very few servers do provide interface for calculating checksums of remote files.
You can post new topics in this forum
And it's free!