Page 1 of 1

Hash value for a file or folder

Posted: March 24th, 2018, 3:31 am
by leulae
Dear all,

I upload text files to the server, then I need to get the Hash values to compare the files in server with files in client (PC / Android) to write confirm script / script to verify files which are identical.

if anyone help me to generate a hash value for a file or folder is highly appreciated

Thank you

Leulae

Re: Hash value for a file or folder

Posted: March 26th, 2018, 10:43 am
by Gregory Martin
You can generate a MD5 hash for a file using the diagnostics function. See more here:

http://www.csprousers.org/help/CSPro/di ... ction.html

Re: Hash value for a file or folder

Posted: March 26th, 2018, 12:47 pm
by josh
Note that if you use the function syncfile(GET,...) with CSWeb, Dropbox or Bluetooth sync, CSPro already calculates the hash and only downloads the file if the hash on the server is different. Unfortunately this is not for syncfile(PUT,...) so for that you would need to calculate your own hash.