Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Folder Action - duplicating files



I have a simple folder actions script that works fine for duplicating items to a second folder when new items are added to the original folder. However, items being deposited into the original folder can be new and some are just updates to existing items. The script as written does not react to updates causing the second folder to be "out of date", which I'm sure is due to the "adding" folder items statement. Essentially I want to synchronize the second folder to the first with AppleScript.

What do I need to add/modify to accomplish this? I've tried various iterations with no luck. I need the second folder to contain duplicates to stand on their own and not be aliases.

--------------
on adding folder items to this_folder after receiving these_items
set theFolder to "Mini:Users:me:Desktop:aFolder"
repeat with this_item in these_items
tell application "Finder"
try
duplicate this_item to folder theFolder with replacing
on error
--do stuff
end try
end tell
end repeat
end adding folder items to
----------------


Thanks-
-Bob
------------


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/applescript-users/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.