终端:Applescript中网络驱动器的路径


3

我正在尝试将文件复制到AppleScript中的网络驱动器。

通常我会的..

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

网络驱动器的正确路径是什么?我通常通过执行以下操作与finder连接:

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

我该怎么办:

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

Answers:


2

正确的语法是 smb://[<user>@]<workgroup>[:<port>][/]

要回答第二个问题:

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

0

命令

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

返回“无此文件或目录” Finder将网络驱动器挂载在/ Volumes /下

do shell script "mv ~/Desktop/file.txt /Volumes/netDrive/MyShare/Folder/file.txt"
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.