Title: Re: Archiving Mailboxes
Thanks a lot Barry!
Not sure I understand from Paul’s description exactly what this is going to do!
“makes a text file of each message as it comes in” – can you clarify?
Regards,
sgr
From: Barry Wainwright <[EMAIL PROTECTED]>
Reply-To: "Entourage:mac Talk" <[email protected]>
Date: Wed, 22 Jun 2005 00:35:07 +0100
To: "Entourage:mac Talk" <[email protected]>
Subject: Re: Archiving Mailboxes
I can!
I haven't posted the script yet, because it is still in a form that is unique to my setup. I will try and get a generic one up in a day or two.
However, in the meantime, here is the one I am using. You will hve to substitute your own folder references for mine, but that should be fairly obvious. If it isn't, please shout up...
property archiveFolder : alias "Denise:Users:barryw:Documents:Work:TRB:Customers:Bombardier LUL Doors:eMails:" -- put your own folder path in here
set logFilePath to ((path to library folder from user domain) as text) & "Logs:com.barryw.messageBackup.log"
try
set logFile to open for access logFilePath with write permission
set eof logFile to 0
on error errmess
display dialog "an error occurred opening the log file:" & return & errmess buttons {"OK"} default button 1 with icon stop
close access logFilePath
beep
return
end try
tell application "Console" to open logFilePath as alias
set t1 to current date
write "+++++++++++++++++++++++++" & return to logFile
write "Backup Run started: " & t1 & return to logFile
write "+++++++++++++++++++++++++" & return to logFile
tell application "Microsoft Entourage"
set theFolder to folder "Bombardier (VLU)" of folder "Customers" of folder "Work" -- put your own Entourage folder reference in here
set theMessages to messages of theFolder
set filesWritten to 0
set writeErrors to 0
repeat with aMessage in theMessages
--set aMessage to first message of theFolder
set sentTime to time sent of aMessage
set fileName to subject of aMessage & " [" & short date string of sentTime & " " & time string of sentTime & "]"
-- take out the characters that play havoc with the backup
repeat with aPair in {{":", ";"}, {"/", "-"}, {"\"", "''"}, {">", "]"}, {"<", "["}, {"?", "*"}}
set AppleScript's text item delimiters to {item 1 of aPair}
set textItems to text items of fileName
set AppleScript's text item delimiters to {item 2 of aPair}
set fileName to textItems as text
end repeat
tell me to write fileName & ": " to logFile
tell application "Finder" to set fileExists to exists file fileName of archiveFolder
if not fileExists then
set modDate to time sent of aMessage
save aMessage in (archiveFolder as text) & fileName
tell application "Finder" to set modification date of alias ((archiveFolder as text) & fileName) to modDate
set filesWritten to filesWritten + 1
tell me to write "***Written***" & return to logFile
else
tell me to write "Skipped" & return to logFile
end if
end repeat
end tell
set t2 to current date
write "+++++++++++++++++++++++++" & return to logFile
write "Backup Run ended: " & t2 & return to logFile
write "time taken: " & t2 - t1 & " seconds" & return to logFile
write "Files Written: " & filesWritten & return to logFile
write "+++++++++++++++++++++++++" & return to logFile
close access logFile
--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Seen the All-New Entourage Help Pages? - Check them out:
<http://www.entourage.mvps.org/>
> From: Stephen Rayment <[EMAIL PROTECTED]>
> Reply-To: "Entourage:mac Talk" <[email protected]>
> Date: Mon, 20 Jun 2005 21:23:54 -0400
> To: "Entourage:mac Talk" <[email protected]>
> Subject: Re: Archiving Mailboxes
>
> Thanks Paul.
> Not sure if this script will help, but I'll try anything once!
> I took a quick look at macscripters for Barry's script, but I couldn't
> recognize anything that looked like it.
> Can somebody give me some more specifics?
> Many Thanks,
> sgr
>
>
>> From: Paul Berkowitz <[EMAIL PROTECTED]>
>> Reply-To: "Entourage:mac Talk" <[email protected]>
>> Date: Mon, 20 Jun 2005 10:29:53 -0700
>> To: Entourage Mac Talk <[email protected]>
>> Subject: Re: Archiving Mailboxes
>>
>> On 6/20/05 10:13 AM, "Stephen Rayment" <[EMAIL PROTECTED]> wrote:
>>
>>> Like many people, I create monthly archives of my e-mail - 'cause I get too
>>> much! So far, I do that by creating subfolders within "Folders on My
>>> Computer". Then I drag the folder to/from a .mbox or use Paul Berkovitz's
>>> Imprt-Export scripts. This works, but is awfully time consumptive, when all
>>> you want to do is check a message from last June! My monthly .mbox's are
>>> pretty big 2-300MB. Are there any alternatives? For example, Apple Mail
>>> and MS Outlook for Windows allow each folder to be a separate file, making
>>> it much easier to attach/detach them quickly from the folder list. Any
>>> plans to do that with E'rage? I'll never go back to Outlook but Apple Mail
>>> is looking awfully tempting right now ;-)
>>
>> Creating an .mbox archive regularly is sensible. You can schedule it for a
>> time (like the middle of the night) when you don't need to do anything else.
>> Do you then delete the original messages? If not, why are you bringing the
>> .mbox back in later? Just search for the message in Entourage. So I guess
>> you must be deleting originals, if you want to keep the database size down.
>> Once a month seems a bit extreme - I do it every 6 months or so - but YMMV.
>>
>> OK. So the issue is just one of the time it takes to import the .mbox back
>> in, or open it, when you want to check a message, right? If you merely need
>> to check the message, don't open the .mbox in Entourage. Just open it in
>> TextEdit (drag it onto TextEdit's icon), or another text editor, and do a
>> Find there, Harder to browse, of course, and you can't reply to the message.
>>
>> The best thing might be to use Barry's script+rule which makes text files of
>> each message as it comes in. Then Spotlight can find anything in an instant,
>> plus you can still reply to the message by double-clicking it to open in
>> Entourage. So now your once-a-month activity will just be to _delete_
>> messages, nothing else. You already have them backed up per-message, just
>> like Mail does. And I think the script files them in Finder folders
>> mirroring Entourage folders.
>>
>> I can't recall what Barry calls it, nor if he posted it on macscripter.net
>> or only here or in the Entourage newsgroup. I'm sure he'll be along shortly
>> to remind us. It's a really simple script and could be recreated within
>> minutes but I'm sure Barry has it to hand.
>>
>> --
>> Paul Berkowitz
>> MVP MacOffice
>> Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
>> AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>
>>
>> PLEASE always state which version of Microsoft Office you are using -
>> **2004**, X or 2001. It's often impossible to answer your questions
>> otherwise.
>>
>>
>> --
>> To unsubscribe:
>> <mailto:[EMAIL PROTECTED]>
>> archives:
>> <http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
>> old-archive:
>> <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>
>>
>
> --
> To unsubscribe:
> <mailto:[EMAIL PROTECTED]>
> archives:
> <http://www.mail-archive.com/entourage-talk%40lists.letterrip.com/>
> old-archive:
> <http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>
>
- Re: Archiving Mailboxes Stephen Rayment
- Re: Archiving Mailboxes Barry Wainwright
