Re: Folder Action script runs on file renaming
Re: Folder Action script runs on file renaming
- Subject: Re: Folder Action script runs on file renaming
- From: Christopher Nebel <email@hidden>
- Date: Thu, 6 Dec 2007 14:13:59 -0800
On Dec 6, 2007, at 1:21 PM, Rob Lewis wrote:
I have a folder action script that runs when items are added to the
folder.
I just discovered that the script also runs when anything already in
the folder is renamed. I want to stop this.
The basic rule for folder action scripts is to move the file out of
the "hot" folder, if not immediately, then by the time the script
finishes. There are two reasons for this. First is the one you've
already found -- Folder Actions detects "new" items by name, so a
renamed item is considered to be new. Second is that in order to find
the new items, it must scan all the items in the folder -- this is a
technical limitation of the OS -- which can become a performance
problem as items are allowed to pile up into the thousands.
Short version: move first, then rename.
--Chris Nebel
AppleScript Engineering
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden