Old Adium Logs
Posted August 8th, 2003 @ 11:40pm by Erik J. Barzeski
This script made short work of 58 "out of date" Adium log folders:
property logsFolder : "Gaia:Users:iacas:Library:Application Support:Adium:Users:iacas:Logs"
set cutoffDate to ( (current date) - (90 * days) )
tell application "Finder"
set folderList to (folders of folder logsFolder)
repeat with i from 1 to count of folderList
set AliasPath to item i of folderList as alias
set folderMod to modification date of (info for AliasPath)
if folderModNote: that first line is wrapped so it'll fit better on this page. Don't wrap your
logsFolder
if you use this script.
Posted 09 Aug 2003 at 12:13am #
Why would you want to delete old logs? You never know when they may become useful and it's not like they take up gigs of space...
Posted 09 Aug 2003 at 12:38am #
Well, if I haven't talked to someone in 90 days, then I don't need them around. Keeping them around clutters searches (ahhh, grep), makes the popup list in Adium quite unusable, etc.
Posted 09 Aug 2003 at 12:55am #
Didn't I do that in a comment to this entry that was deleted by you?
Posted 09 Aug 2003 at 9:28am #
The only posts I've deleted have been rude ones or duplicates, so no. I've modified a few, like yours above, to fix links as well.
Regardless, thanks for pointing out again a bug that still exists in the AppleScripting section of Mac OS X. I should try this on Panther…
Posted 17 Aug 2003 at 8:31pm #
*shrug* I posted the code you made some smart ass remark about double posting.
Either way I don't think it's a bug in AppleScripting for Mac OS X, since it doesn't work in OS 9.
Also remember that the Finder scripting dictionary is ancient compared to a lot of the Mac OS X application and work s under different, old style, rules.
Posted 17 Aug 2003 at 9:59pm #
It's a confirmed bug. Thanks for playing. 😐