Hello MacScripters,
I am very new to Applescript, and I’m trying to do something that seems easy, but I just can’t seem to find the correct solution. I want to seperate files with the prefix of “pola” from other files located inside a collection folder and then duplicate those files to another folder for archiving. The workflow chain includes three folders: A drop folder, where all images are collected, and two folders for archiving, one archive that archives all image files, and a second folder which only includes files with the prefix “pola”.
I have read what I can from this site, including the Scripting for Beginners, and I found a solution to the first part of the script, duplicating all the files to backup, but the code I’ve written for the second part, the seperation of files, does not work. Any help, suggestions, or direction to research would be a great help.
Thanks in advance for your knowledge,
David
My script so far:
on adding folder items to this_folder after receiving these_items
tell application “Finder”
duplicate these_items to “love:users:david:desktop:edit” without replacing
end tell
tell application “Finder”
if these_items begins with “pola” then duplicate to “love:users:david:desktop:pola” without replacing
end tell
end adding folder items to
Model: Mac G5
AppleScript: 2.1
Browser: Firefox 1.5.0.1
Operating System: Mac OS X (10.4)