The script flow would be something like this;
script calls for you to locate .md5 file (file which contains the information we need)
parses first line, seperating the MD5 and the Filename into serperate variables (GoodMD5 and File, respectively)
checks the directory of the .md5 file for a file with the same name as File
If found, runs ‘md5’ from terminal on File, setting this output to variable FileMD5
then checks if GoodMD5 = YourMD5
If they match, prints some kind of ‘File Okay’ message
If they don’t match, print a ‘File Corrupt. MD5 is (YourMD5), should be (GoodMD5)’
repeat, parsing next line of the text file until End Of File
What I’m having trouble with here is seperating the lines of the file into variables.
A line of .md5 file looks something like this;
I’m currently using a delimiter script to seperate them, as so;
set theText to "07f73cd474cdf8dcc03c13e7743d4043 *sp112900_d1_t14.shn" set OldDelims to AppleScript's text item delimiters set AppleScript's text item delimiters to " *" set newText to text items of theText set AppleScript's text item delimiters to OldDelims newText
Whew. That was a mouthful.