Re: "try" broke???
Re: "try" broke???
- Subject: Re: "try" broke???
- From: Stan Cleveland <email@hidden>
- Date: Tue, 06 Nov 2012 15:16:26 -0800
On Nov 6, 2012, at 2:26 PM, Robert Poland wrote: Running from Smile AND Applescript Editor, when pointed at a CD the following script errors out and won't run;
Hi Robert,
Here's my take on what's needed to achieve your goal:
tell application "Finder" activate tell window 1 -- clears out Finder idiosyncrasies (will take your word on that) tell application "Finder" set winTarget to target of front window as alias end tell end tell end tell set fileList to list folder winTarget with invisibles -- from standard additions — should not be inside a 'tell' if fileList contains ".DS_Store" then tell application "Finder" -- 'tell window 1' and 'try' are not needed delete item ("" & winTarget & ".DS_Store") -- needs a full path end tell end if
HTH,Stan C.
|
_______________________________________________
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