Title: Re: Import Thunderbird mailboxes in Entourage 2004?
On 5/17/06 10:02 AM, "Allen Watson" <[EMAIL PROTECTED]> wrote:
> 2. Entourage insists that mailbox files have the extension of ".mbx", so use
> Cmd-D to make a copy of each folder you want to import, and then rename the
> copy so it is, for instance, "Inbox.mbx".
That's wrong, Allen. The extension needs to be ".mbox". It won't work with ".mbx" (which is what Eudora Windows requires). Probably that was just a typo?
If you're going to be setting the file type by script, you could set the extension by script too, but it's a little complicated.
> You also must set the file type to
> TEXT;
Actually, that's not true, though it works OK. It's Eudora Mac that requires the file type to be TEXT, not Entourage, so you need to do this if exporting to Eudora Mac (as one of Barry's scripts does). Entourage actually prefers (but doesn't require) that the file type be MBOX. As long as the extension is .mbox, it doesn't really matter what the file type or creator type is.
So all you really need to do is add/change the .mbox extension. If you do it manually, that's it. If doing it by script to save a bit of effort, might as well set the file type and creator type too, so it looks like a regular Entourage MBOX with the icon. And once you're doing that, why not just import by script too? Also, the 'on error' needs to be fixed: if there is an error, the 'exit repeat' will itself error since it's not in a repeat loop at this point.
So, for optimum ease:
Select the file(s) in Finder and run this script in Script Editor, or from the Entourage script menu if you save it to there for future use::
on run
try
tell application "Finder"
set theFiles to the selection
repeat with aFile in theFiles
set aFile to aFile as alias -- so still refers when name is changed
set {theName, theExtension} to aFile's {name, name extension}
if theExtension ≠ "" then
set AppleScript's text item delimiters to {"."}
set theName to text item 1 of theName
set AppleScript's text item delimiters to {""}
end if
set name of aFile to theName & ".mbox"
set file type of aFile to "MBOX"
set creator type of aFile to "OPIM"
tell application "Microsoft Entourage" to import aFile
end repeat
end tell
on error theMsg
display dialog theMsg
return
end try
end run
(I presume that the unnecessary 'on run' is so that you could also include an 'on open' handler an save the script as an application (droplet) on which you could drop files instead of selecting them. Left as an exercise...)
--
Paul Berkowitz
