2

我正在尝试在服务器上创建一个新文件夹,其名称取自用户。这是我到目前为止所拥有的

display dialog "Please enter your augnet username" default answer "username"
set username to (text returned of result)

mount volume "smb://orgs.augsburg.edu"

tell application "Finder"
    make new folder at "orgs.augsburg.edu/Information Technology/www/kb_images/Migration Testing" with properties {name:username}
end tell

我收到一条错误消息,说“无法制作类型项目”,非常感谢任何帮助。谢谢!

4

1 回答 1

0

你有一个错误,因为:

1 - 此路径的类型为“posix path”,Finder无法识别此类型,斜杠应替换为冒号

2-当您在 Finder 中使用字符串(路径)时,您必须指定类(文件夹、文件、磁盘...)

display dialog "Please enter your augnet username" default answer "username"
set username to (text returned of result)

mount volume "smb://orgs.augsburg.edu"
tell application "Finder"
    make new folder at folder "orgs.augsburg.edu:Information Technology:www:kb_images:Migration Testing:" with properties {name:username}
end tell
于 2012-05-17T20:58:17.107 回答