Re: Saving Attachements to a folder
Re: Saving Attachements to a folder
- Subject: Re: Saving Attachements to a folder
- From: has <email@hidden>
- Date: Mon, 20 Aug 2007 20:21:35 +0100
Ronald Hofmann wrote:
I´m trying to save the attachement of a mail (selection) to a folder.
[...]
Could somebody point me to the right direction?
set folderPath to "MacOSX:Users:ronny:Desktop:Target:"
tell application "Mail"
repeat with msgRef in (get selection)
repeat with attachmentRef in mail attachments of msgRef
set filePath to (folderPath & name of attachmentRef) -- note:
assumes attachment name doesn't contain colons
save attachmentRef in filePath -- note: will raise an error if
file already exists
end repeat
end repeat
end tell
HTH
has
--
http://appscript.sourceforge.net
http://rb-appscript.rubyforge.org
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden