Hello,
One member (thank you Bruce) has helped me creating an AppleScript for Mail (see under), that extracts PDF files from Mail, and copies them to a directory on the desktop called Incoming PDF with a unique filename.
The name comes as example: Scan-177202-2.pdf
Is there a way that the name of the created .PDF file(s) includes the date/time of the received e-mail ?
YYYYMMDDHHmmss-MessageID-ItemID.pdf where YYYYMMDDHHmmss is the arrival time of the e-mail in my mailbox ?
example:
20081021101845-177202-2.pdf ?
Thanks in advance.
--------------This is the Script---------------
on perform_mail_action(theData)
set outputPath to (path to desktop as Unicode text) & “Incoming PDF:”
set theseMessages to |SelectedMessages| of theData
tell application id “com.apple.mail”
repeat with thisMessage in theseMessages
repeat with thisItem in mail attachments of thisMessage
try
if MIME type of thisItem is “application/pdf” then
save thisItem in (outputPath & “Scan-” & id of thisMessage & “-” & id of thisItem & “.pdf”)
end if
end try
end repeat
end repeat
end tell
end perform_mail_action