• 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
Delete
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Delete


  • Subject: Delete
  • From: "R. Nelson Byrne" <email@hidden>
  • Date: Wed, 18 Aug 2010 17:02:45 -0700

Here's my script:

alias "Hard Time:Desktop Folder:DATAFILE.pdf" returning aFile
tell application "Finder" to get size of aFile
tell application "System Events" to delete aFile


When I run it, the log shows:

tell application "Finder"
get size of alias "Hard Time:Desktop Folder:DATAFILE.pdf"
156269
end tell
tell application "System Events"
delete alias "Hard Time:Desktop Folder:DATAFILE.pdf"
"System Events got an error: Can’t make alias \"Hard Time:Desktop Folder:DATAFILE.pdf\" into type reference."



Why can't I delete this file (which I know exists, the Finder tells me so.)


Regards,


R. Nelson Byrne _______________________________________________ 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: Delete
      • From: André Renault <email@hidden>
  • Prev by Date: Remember Finder windows left open at shutdown
  • Next by Date: Re: Delete
  • Previous by thread: Re: Remember Finder windows left open at shutdown
  • Next by thread: Re: Delete
  • Index(es):
    • Date
    • Thread