I have a text file of around 500 selected file names (each on its own line) from an event I photographed with over 3,000 pictures. I want to be able to find all those images in the folder, duplicate them, and move those duplicated files into a different folder.
This is what I have so far. Right now it just copies the entire folder of 3,000 images and puts it into the destination folder, but not the individual files..
TEXT FILE:
_EPW0847.jpg _EPW0848.jpg _EPW0853.jpg etc....
APPLESCRIPT:
set thePhotos to paragraphs of (read (choose file with prompt "Choose a text file"))
set theSourceFolder to (choose folder with prompt "Choose source folder") as string
set theDestination to (choose folder with prompt "Choose destination folder")
repeat with theName in thePhotos
try
tell application "Finder" to duplicate alias (theSourceFolder & theName) to theDestination with replacing
end try
end repeat
tell application "Finder"
tell folder theDestination to set theCount1 to (count of items) as string
end tell
set theCount2 to (count of thePhotos) as string
display dialog (theCount1 & " of " & theCount2 & " items copied to " & theDestination) buttons {"OK"}
Any help would be great. I don't know apple script that well yet, but I'm learning. Thanks!