• 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: Problem Emptying Trash
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem Emptying Trash


  • Subject: Re: Problem Emptying Trash
  • From: kai <email@hidden>
  • Date: Sun, 5 Mar 2006 01:22:21 +0000


On 4 Mar 2006, at 23:46, Jon Rosen wrote:

tell application "Finder"
		repeat with i from 1 to pdfCount
			--pdfFiles only contains a list of the individual PDF files
			set thisFile to (pdfFolder as text) & item i of pdfFiles as text
			delete thisFile as alias
		end repeat
		-- empty the trash so it doesn't fill up with 50,000 files
		empty
	end tell

I couldn't find a way to delete all of the files in a folder at once, but I would welcome any suggestions.

When you say that the variable 'pdfFiles' only contains a list of the PDF files, do you mean a list of filenames, Jon? If so, this should work:


----------------

tell application "Finder" to delete (pdfFolder's files whose name is in pdfFiles)


----------------

---
kai


_______________________________________________ Do not post admin requests to the list. They will be ignored. Applescript-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >Problem Emptying Trash (From: Jon Rosen <email@hidden>)

  • Prev by Date: Re: Problem Emptying Trash
  • Next by Date: Re: move file - why does it not work?
  • Previous by thread: Re: Problem Emptying Trash
  • Next by thread: Re: Problem Emptying Trash
  • Index(es):
    • Date
    • Thread