Problem Emptying Trash
Problem Emptying Trash
- Subject: Problem Emptying Trash
- From: Jon Rosen <email@hidden>
- Date: Sat, 4 Mar 2006 18:46:53 -0500
We updated a computer from 10.3 to 10.4.5 and a script that had been
running reliably for well over a year started timing out. It seems to
hang up in a portion of the script that moves files in a folder one
at a time to the trash and then empties the trash. That is this part
of the script:
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. Has anything changed between
10.3 and 10.4 that would affect this type of script. BTW, I opened
the Trash window in the Finder and added a 1 second delay before the
empty command, and that may have improved the situation for unknown
reasons. For the record, this script works with FileMaker. It takes
a group of PDF files created by FileMaker, combines them using the
PDFtk tookit, and then deletes the individual files and moves the
combined file to a new location.
TIA,
Jon
_______________________________________________
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