George Henne said:
>>>How can I get rid of these zombie files?
>>
>>Move them to the trash & empty the trash.
>>
>
>The problem is not being able to trash them. It's figuring out which of
>the 6000 files in the Attachment folder are zombies.
Search the amount of files you want to work on and use this script or similar:
***
This script marks files that do have related found messages in PowerMail.
Provided you have managed to find all messages, you can then order by
label and trash unmarked files in the finder. Currently it doesn't
warrant moved or deleted attachment files.
tell application "PowerMail"
set theMessages to current messages
set attachCount to 0
repeat with msg in theMessages
set attachList to attachments of msg
repeat with attachIdx from (count items of attachList) to 1 by
-1
set attachCount to attachCount + (count items of
attachList)
set attachFile to file of (item attachIdx of attachList)
if exists (file of (item attachIdx of attachList)) then
tell application "Finder"
--change "2" to whatever setting you'd
like for files that have
related messages
set label index of attachFile to "2"
end tell
end if
end repeat
end repeat
display dialog (attachCount as string) & " files were marked."
end tell
***
I choosed to not let the script move unmarked files to the trash, but
prefer to do it by hand after sorting by label and selecting unmarked
files. This could be added however.
PM 5.2.1 | OS X 10.3.9 | Powerbook G4/400 | 768MB RAM | 30GB HD