Re: Adding files to a Folder Hierarchy
Re: Adding files to a Folder Hierarchy
- Subject: Re: Adding files to a Folder Hierarchy
- From: Andrew Oliver <email@hidden>
- Date: Mon, 06 Dec 2004 10:06:03 -0800
On 12/6/04 9:30 AM, "Steve Suranie" <email@hidden> wrote:
> Can a folder action determine if files have been added to a folder that is a
> level or two down from the folder the action is attached to?
Folder actions only work on the folder they are attached to, not to
subfolders.
>
> I need to create a script that will know when files have been added to a
> folder hierarchy. The script will email a notification that files have been
> added to the appropriate people. I don't want to attach a folder action to
> each sub folder because:
>
> A. The folders have not been created yet.
Simply have your folder action apply the same folder action to any
newly-created folders (using 'on adding folder items to...'). This ensures
any subfolder you create gets the folder action applied.
> B. There has to be a more efficient way.
It's arguable that it is more efficient to do it this way. The OS only has
to look at the folder you're working in to decide if there's a folder action
attached, rather than all parent directories.
Remember that if Folder Actions are enabled, the system has to track all
disk changes to see if a FA script needs to run. The overhead of checking
the current directory is minimal.
Andrew
:)
_______________________________________________
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