Re: Problem Emptying Trash
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