Hash value for a file or folder

Other discussions about CSPro
Forum rules
New release: CSPro 8.0
Post Reply
leulae
Posts: 46
Joined: December 16th, 2016, 5:51 am

Hash value for a file or folder

Post 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
Gregory Martin
Posts: 1777
Joined: December 5th, 2011, 11:27 pm
Location: Washington, DC

Re: Hash value for a file or folder

Post 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
josh
Posts: 2399
Joined: May 5th, 2014, 12:49 pm
Location: Washington DC

Re: Hash value for a file or folder

Post 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.
Post Reply