On Jun 30, 2011, at 8:45 AM, Michelle Steiner wrote: Or you could try this:
property job_name : "Re: file path problem/test" set AppleScript's text item delimiters to {":", "/"} set job_items to text items of job_name set AppleScript's text item delimiters to {"-"} -- or whatever separator you want set new_name to job_items as text --> "Re- file path problem-test"
I have found it useful to simply remove all "colon prefixes" of length less than 4 until there aren't any, then remove any other colons or slashes.
When saving a copy of a message to the Finder, it is useful to know that message files are stored with the name "nnnnnn.emlx" where nnnnnn is the id of the message. (An IMAP INBOX is an exception to this.) This will allow you to quickly copy and rename an emlx file instead of having to write to a new file.
BTW, you can write a file and give it a .eml extension, but does the content of the new file have the proper format?
The difference between an emlx and an eml file is tiny. The emlx file contains a small embedded xml text at the end with meta-data about the message.
My copy of messages in this thread look like this ...
|