• 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: Simply deleting a fil
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simply deleting a fil


  • Subject: Re: Simply deleting a fil
  • From: Yvan KOENIG <email@hidden>
  • Date: Fri, 17 Apr 2009 10:28:56 +0200


Le 17 avr. 2009 à 09:30, Satyam Satyanarayana a écrit :

I am facing simple trouble deleting a folder.
I have a folder "__MACOSX" in my Documents folder. The following are the two lines I am trying to delete the folder. But its not deleting. Not even displaying error.


set deletePath to POSIX path of (path to documents folder) & "__MACOSX"
delete deletePath



set deletePath to POSIX path of (path to documents folder) & "__MACOSX" tell application "System Events" delete deletePath end tell

would do the trick.

As far as I know, delete a file is not a command of the plain AppleScript.
It's a command of some applications like 'System Events', 'Finder' …
In most applications where the delete command is available it's not designed to delete files.


Yvan KOENIG (from FRANCE vendredi 17 avril 2009 10:28:52)


_______________________________________________ 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: Simply deleting a fil
      • From: Tim Mansour <email@hidden>
References: 
 >Re: Photomerge (From: Stan Cleveland <email@hidden>)
 >Simply deleting a fil (From: Satyam Satyanarayana <email@hidden>)

  • Prev by Date: Re: Simply deleting a fil
  • Next by Date: Re: Selecting files of type zip
  • Previous by thread: Re: Simply deleting a fil
  • Next by thread: Re: Simply deleting a fil
  • Index(es):
    • Date
    • Thread