Rename using md5
Rename using md5
Does any of you have an idea on how to use the Rename-feature to rename a file using md5 conversion.
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Rename using md5
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;
Process.execute(new Array("md5", "-q", job.getPath()));
Process.stdout;
Rename using md5
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?
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?
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Rename using md5
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.
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
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?
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?
-
- TOP CONTRIBUTOR
- Posts: 628
- Joined: Mon Nov 29, 2010 8:45 pm
- Location: Alpharetta GA USA
- Contact:
Rename using md5
Sorry, copy-n-paste error. I fixed the URL in original post.