Page 1 of 1

Rename using md5

Posted: Mon Dec 30, 2013 2:19 pm
by Terkelsen
Does any of you have an idea on how to use the Rename-feature to rename a file using md5 conversion.

Rename using md5

Posted: Mon Dec 30, 2013 4:14 pm
by dkelly
Assuming you are running on OSX where 'md5' application is available your could use the following script expression.



Process.execute(new Array("md5", "-q", job.getPath()));

Process.stdout;

Rename using md5

Posted: Tue Dec 31, 2013 3:24 pm
by Terkelsen
Hi Dwight,



You are right, that I'm usually on OSX but in this case I'm trying to help a costumer running Switch on Windows Server 2008. Do I understand you right that this makes a difference for the suggested script?

Rename using md5

Posted: Tue Dec 31, 2013 4:01 pm
by dkelly
The 'md5' utility ships with Mac OS X. It isn't available on Windows without installing something like this: http://www.fourmilab.ch/md5/



You would need to change the script to:



if (s.isMac())

Process.execute(new Array("md5", "-q", job.getPath()));

else

Process.execute(new Array("PathTomd5", "-n", job.getPath()));

Process.stdout;



Customize the path of md5 on Windows to location you installed it.

Rename using md5

Posted: Thu Jan 02, 2014 9:01 am
by Terkelsen
Hi Dwight

I've tested this on Mac OSX and it works just perfect.

For using it on Windows you suggest that I download and install "something like this" and then you supply a download link. The link refers to a PDF, an I'm not quite sure how I'm supposed to use that?

Rename using md5

Posted: Thu Jan 02, 2014 3:53 pm
by dkelly
Sorry, copy-n-paste error. I fixed the URL in original post.