3

I am trying copy a file up to a network drive in AppleScript.

Normally I would do..

do script "mv ~/Desktop/file.txt ~/Folder/file.txt"

What is the correct path to a network drive? I normally connect with finder by doing:

tell application "Finder"
    open location "smb://user:password@netDrive/MyShare"
end tell

How do I do:

do script "mv ~/Desktop/file.txt smb://user:password@netDrive/MyShare/Folder/file.txt"
2

The correct syntax would be smb://[<user>@]<workgroup>[:<port>][/]

To answer your second question:

do shell script "mv ~/Desktop/file.txt smb://user:password@netDrive/MyShare/Folder/file.txt"
0

The command

do shell script "mv ~/Desktop/file.txt smb://user:password@netDrive/MyShare/Folder/file.txt"

return 'No such file or directory' Finder mounts network drives under the /Volumes/

do shell script "mv ~/Desktop/file.txt /Volumes/netDrive/MyShare/Folder/file.txt"

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .