…I don’t know any Applescript… but from reading various others I thought I would try and cobble one together to get what wanted done… but, surprise surprise, it isn’t working.
I am trying to write a script that will delete mail from certain mailboxes once the mail is greater than two weeks old. This is what I have written…
tell application "Finder"
delete (every item of folder "macintosh hd;users;lesturner;library;mail/mailboxesamazon.mbox;messages" whose modification date is less than ((get current date) - 14 * days))
end tell
BUt I am getting the error… “Finder got an error: Can’t get every item of folder “macintosh hd;users;lesturner;library;mail/mailboxesamazon.mbox;messages” whose modification date < date “Monday, 7 May 2007 9:29:51 PM”.”
What am I doing wrong and what can I do about it? I have tried figuring it out, but there is only so many tutorials I can do before I realise that they aren’t answering my question.
Thanks in advance.