I’m new to scripts, having pieced together only a few at this point. The one I am working on now will save me a ton of time (as opposed to doing this all by hand) if I can get it working properly. The script reads in filenames from a text file, goes to the folder you tell it to and finds and copies the images to a new folder that the user specified. After that part, it runs does a shell script with exiftool to get the original filename from the jpeg and puts them in a text file. Finally, it takes that text file and searches the user specified folder for the raw files and copies them to another user specified folder.
The issue I am running into is that the last part is not finding the Raw files in the sub folders.
Any help with this issue or in speeding up the script would be very much appreciated.
Thanks,
Scott
set origFolder to (choose folder with prompt “Select the Folder containing your images:”)
set SelectionFile to (read (choose file with prompt “Pick the text file:”))
set destFolder to (choose folder with prompt “Choose a Folder for to copy your images to:”)
set documentPOSIXpath to POSIX path of destFolder
tell application “Finder”
set sub_folders to folders of origFolder
repeat with each_folder in sub_folders
duplicate (files of each_folder whose name is in paragraphs of SelectionFile) to destFolder
end repeat
end tell
do shell script "cd " & quoted form of documentPOSIXpath & “;exiftool -p ‘$XMP-crs:RawFileName’ . > rawnames.txt”
set origFolder to (choose folder with prompt “Select the Folder containing your images:”)
set SelectionFile to (read (choose file with prompt “Pick the text file with the Raw filenames:”))
set destFolder to (choose folder with prompt “Select location to copy Raw files to:”)
tell application “Finder”
set sub_folders to folders of origFolder
repeat with each_folder in sub_folders
duplicate (files of each_folder whose name is in paragraphs of SelectionFile) to destFolder
end repeat
end tell
Model: Mac Pro Early 2008 3.0Ghz
AppleScript: 2.1.2
Browser: Safari 533.19.4
Operating System: Mac OS X (10.6)