Re: Folder action to rename files
Re: Folder action to rename files
- Subject: Re: Folder action to rename files
- From: Matt Deatherage <email@hidden>
- Date: Thu, 25 Aug 2005 16:05:44 -0500
On 8/25/05 at 1:21 PM, Mark J. Reed <email@hidden> wrote:
> When they drag a new file into the folder, it magically appears in
> your window, and this is your cue to run the Folder Action script on
> that new file. Then, that file magically disappears, and in its
> place a different file appears - so you run the Folder Action script
> on that new file. Unfortunately, it's not really a new file, it's
> just the old file with a different name, but you don't know that.
It pretty much has to work that way for "adding" actions to work correctly. Applications like Safari first create temporary files (in Safari's case, with a ".download" extension), and then rename them to the final name when they've completely arrived.
If renaming didn't trigger the "add" action, then you couldn't write a script to process all JPEG files that Safari downloads into a folder, or all ".zip" or ".sitx" files, because you'd never see one - your script would only see ".download" files being added.
Perhaps an enhancement would be to add an optional "rename" handler, with the understanding that if such is present, the "add" handler doesn't get rename calls - but I'm not really sure what that would buy anyone who understands the situation. (i.e., I can't immediately think of a script you could write with that addition that you can't write today if you know what's going on.)
--
Matt Deatherage <email@hidden>
GCSF, Incorporated <http://www.macjournals.com>
The medicine's working. Please continue being purple.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden