Error when trying to save a Mail Attachment

Hello, I have a script which looks for certain mail messages and saves the attachment in the downloads folder. I’m getting an error on the save command saying to try top save the file to another volume. All the variables look correct and Script Debugger and Mail have full disk access. Any suggestions? I have attached a screenshot at the point in time the error occurs.

Appreciate any suggestions or ideas anyone may have.

You’re mixing up your HFS & POSIX path formats.

HFS paths look like this: Macintosh HD:Users:tim:Downloads:
POSIX paths look like this: /Users/tim/Downloads/

The highlighted line should be:

save currentAttachment in file HFS_path


save currentAttachment in POSIX file POSIX_path

Thanks so much for the response, I’ll try it later this afternoon… Again Thanks…


I just tried it, that did it THANK YOU!!!