Re: Dodge .DS_Store files in Folder Action
Re: Dodge .DS_Store files in Folder Action
- Subject: Re: Dodge .DS_Store files in Folder Action
- From: "Adam K. Wuellner" <email@hidden>
- Date: Fri, 28 Jan 2005 11:48:29 -0600
On Jan 28, 2005, at 11:17 AM, Simon Troup wrote:
I've got a big chunk of folder action code that works fine apart from
the fact that .DS_Store files seem to keep getting included into the
list of dropped files.
I'm trying to find a way to dodge those files from being processed
even if they get included in the list.
[snip]
UNTESTED:
on adding folder items to this_folder after receiving these_files
repeat with i from 1 to number of items in these_files
if [filename of i is .DS_Store] then
tell application "Finder" to set file_name_ to name of item i of
these_files
if file_name_ is ".DS_Store" then
[delete it!]
tell application "Finder" to move item i of these_files to the trash
else
[large bit of working script edited out]
end if
end repeat
end adding folder items to
_______________________________________________
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