View Full Version : Applescript how to save to PC on network

Jun 10, 2013, 10:40 AM
Currently I have an Applescript that saves a mail attachment to my Desktop. I would like to change it to save to a a PC on my network. Not really sure how to change it.

The PC shows up in Finder under shared and the server shows as


on perform_mail_action(theData)

set theOutputFolder to "Macintosh HD:Desktop"

So I would like to change theOutputFolder to the shipping/SharedDocs/

I am not really sure how to do this and any assistance would be much appreciated.


Jun 10, 2013, 12:55 PM
The easy way is to find the name of that folder is to select the PC folder in the Finder, then run the following script:
tell app "Finder"
(selection as alias)

The result will be the folder location. Copy and paste that into your script.

Jun 10, 2013, 03:35 PM
The script returned "SharedDocs:" but that doesn't work

Jun 10, 2013, 04:55 PM
Try :

set theOutputFolder to "Macintosh HD:Volumes:SharedDocs:"

Jun 10, 2013, 11:56 PM
That's curious. It works for me. I wonder what the difference is.

Jun 11, 2013, 04:36 AM
Worked using the

set theOutputFolder to "Macintosh HD:Volumes:SharedDocs:"

Thank you!

Jun 11, 2013, 05:32 AM
I need this script to replace the existing saved attachment

My original code to save is
save theAttachment in theSavePath

I tried

save theAttachment in theSavePath with replacing

This did not work, but just need to overwrite existing file