Terminal: Path to Network Drive in Applescript

applescriptterminal

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"

Best Answer

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"