Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'An AppleScript to move/delete old Entourage emails' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
An AppleScript to move/delete old Entourage emails
Authored by: fresler on Aug 19, '04 11:35:23AM

I discovered how to write the line that excludes folders in a better way. The better was is:
[code]if folderName is not in {"Keep", "Deleted Items", "Archive", "Sent Items"} then[/code]



[ Reply to This | # ]
An AppleScript to move/delete old Entourage emails
Authored by: lukec on Aug 19, '04 11:58:53AM

The problem with this is that it only goes 2 folders deep. Many of us have folder that go 5 levels deep or more. You need some proper recursion in here, my friend. A good start. I'm sure someone will eventually pipe up with some real code, but here's what it looks like.

<code>
on process_folder(myfolder)
repeat with my folder in every folder
process_folder(myfolder)
end repeat
--do process folder stuff here like copying messages
--checking date and folder names
end process_folder

on run
repeat with myfolder in every folder
process_folder(myfolder)
end repeat
end run
</code>

This is just intended as a starting point.

Luke



[ Reply to This | # ]