• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: "try" broke???
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "try" broke???


  • Subject: Re: "try" broke???
  • From: Wayne Melrose <email@hidden>
  • Date: Wed, 07 Nov 2012 09:43:48 +1100

I'm not sure I can tell you why you can not delete that file, but I know a try will fail for mounting a volume (that won't mount) but I'd say its more to do with permissions in finder deleting a .ds store file. Of be inclined to look more toward

Do shell script "rm /path/.DS_Store" 

And put that in a try block

Sent from my iPhone

On 07/11/2012, at 9:26 AM, Robert Poland <email@hidden> wrote:

Hi,

Running from Smile AND Applescript Editor, when pointed at a CD the following script errors out and won't run;

tell application "Finder"
activate
tell window 1 -- clears out Finder idiosyncrasies
tell application "Finder" -- used here and at end
set winTarget to target of front window as alias
end tell
set fileList to list folder winTarget with invisibles
try
if fileList contains ".DS_Store" then
delete item ".DS_Store"
end if
end try
end tell
end tell


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
  • Follow-Ups:
    • Re: "try" broke???
      • From: Steve Thompson <email@hidden>
  • Prev by Date: Re: "try" broke???
  • Next by Date: Re: "try" broke???
  • Previous by thread: Re: "try" broke???
  • Next by thread: Re: "try" broke???
  • Index(es):
    • Date
    • Thread