Results 1 to 4 of 4
  1. #1
    Create Automator Service to make MD5 Checksum of External Hard Drive

    Member Since
    May 26, 2012
    Posts
    2
    Create Automator Service to make MD5 Checksum of External Hard Drive
    Hello,

    Can someone help me make an Automator Service that will generate an MD5 Checksum of a Hard Drive just by Right Clicking the Drive and selecting the service? I'm new to this!

    Thanks!

  2. #2
    Create Automator Service to make MD5 Checksum of External Hard Drive
    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    Location
    West Sussex, UK
    Posts
    180
    Do you know any Applescript ?

  3. #3
    Create Automator Service to make MD5 Checksum of External Hard Drive
    Mark FX's Avatar
    Member Since
    Aug 13, 2011
    Location
    West Sussex, UK
    Posts
    180
    I have'nt done much with Automator myself, but I do believe you can run Applescripts in Automator workflows, and there is a Unix command line utility called "md5" that returns a checksum on any files or folders supplied to it, if you open up the Terminal app and type this into the command line followed by the return key.

    Code:
    md5 (yourFileName.txt)
    this will return the checksum for the file if it is a valid file path, for more info on the md5 command, type this into the terminal.

    Code:
    man md5
    this will return the manual for the md5 utility, I dont know if the same utility can be used for drive paths as well, or if there is another command line tool for your purposes, you may have to check that with one of the Unix tools websites.

    If you do know any Applescript coding, then you can design a Applescript droplet that runs a shell script command to the md5 utility, when a file or folder or drive is dropped onto your droplet application, for example.

    Code:
    on run
    	set filePath to POSIX path of (path to documents folder) & "MyTextFile.txt" as text
    	set theResult to do shell script "md5" & space & quoted form of filePath
    	return theResult
    end run
    This will return the checksum result on a file called MyTextFile.txt in your Documents folder.
    If you put this code into a on open handler instead of an on run handler, then it will return the same result when files are dropped onto your compiled droplet application.

    Like Automator, I dont know a lot of Applescript, but I always go to the MacScripter forums for help with my scripts, there are some really smart and knowledgable guys over there, that could probably come up a a trick Applescript solution for you.

    MacScripter

    Sorry I could not be more help.

    Regards Mark

  4. #4
    Create Automator Service to make MD5 Checksum of External Hard Drive

    Member Since
    May 26, 2012
    Posts
    2
    What I have created right now is an Automator Service. The Service is selected for Files and Folders with the Application Finder. I then have a Shell Script with the following code:

    find $1 $2 $3 $4 $5 -type f -exec md5 -r "{}" \; > $1/../DRIVE.md5

    What this allows me to do is select multiple folders at a time, right click and select my service and then it creates an MD5 file on the Parent Directory. Unfortunately, I would like to be able to right click on a hard drive, select the service and it generate an MD5 file of the entire hard drive, with the MD5 file saving on the hard drive.

    I have been able to use the code via Terminal by using "cd" and selecting the drive path and then pasting in the code, but I would like to skip the whole process of doing this via Terminal. Maybe the Automator Service is in correct and there can be a better way to do this? I've really new to scripting and have had help from others creating this code but no success yet at doing what I would want it to be doing.

    Suggestions? Thanks for the help!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. how do I make an external OS X hard drive with OS X 10, 10.6, and 10.7?
    By jewfromdahood in forum OS X - Operating System
    Replies: 8
    Last Post: 11-02-2011, 01:35 AM
  2. Can I Create Two Clones On One External Hard Drive?
    By Matthew M. in forum Other Hardware and Peripherals
    Replies: 1
    Last Post: 07-18-2010, 09:41 PM
  3. How to create new folder on External Hard Drive
    By 700islands in forum Switcher Hangout
    Replies: 2
    Last Post: 10-03-2009, 07:24 AM
  4. Replies: 2
    Last Post: 03-21-2009, 11:42 PM
  5. Did I make a good choice (external hard drive)?
    By milk is white in forum Other Hardware and Peripherals
    Replies: 2
    Last Post: 11-13-2008, 10:59 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •