• 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: Deleting Folder Contents
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Deleting Folder Contents


  • Subject: Re: Deleting Folder Contents
  • From: Axel Luttgens <email@hidden>
  • Date: Mon, 11 Oct 2010 18:52:23 +0200

Le 11 oct. 2010 à 18:39:08, Luther Fuller a écrit :

> I have been using this to trash the contents of a folder ...
>
> 	tell application "Finder"
> 		--
> 		--
> 		delete every item of folderAlias
> 	end tell
>
> I would like to use the following to avoid the files appearing in the trash ...
>
> 	tell application "Finder"
> 		--
> 		--
> 	end tell
> 	tell application "System Events" to delete every item of disk item (folderAlias as text)
>
> but, I can't get the last line of this code to work.
> I've tried many variations on this theme, but nothing.
> Anyone know the correct line of code?

Hello Luther,

Something like this works here:

tell application "System Events"
	delete (get disk item "x" of folder "a" of desktop folder)
end tell

Axel

 _______________________________________________
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

References: 
 >Deleting Folder Contents (From: Luther Fuller <email@hidden>)

  • Prev by Date: Deleting Folder Contents
  • Next by Date: Re: Deleting Folder Contents
  • Previous by thread: Deleting Folder Contents
  • Next by thread: Re: Deleting Folder Contents
  • Index(es):
    • Date
    • Thread