1

因此,我有一个 Applescript 可以帮助正确命名照片以供数据输入以将其分配给唯一 ID。由于我们使用的是 Mac,这是在 AppleScript 中完成的。这很好用,但它只适用于一台机器。现在需要的是在多台机器上工作。我想要做的是将照片放在我们的服务器上,并让客户端机器从那里对文件夹执行操作。

我目前遇到的问题是该脚本不会对用户进行身份验证并且即使信息正确也不会运行该脚本。我这样做正确吗?

tell application "Finder" of machine "eppc://user:password@server.local"
set renameFiles to the selection
set inventoryFiles to every file in folder (((path to documents folder) as text) &   "Inventory Photos")
set currentIndex to the count of inventoryFiles
repeat with i from 1 to the count of renameFiles
    set currentFile to (item i of renameFiles)
    set new_name to ((10000 + currentIndex + i) as text) & ".jpg"
        set name of currentFile to "a" & new_name
end repeat
end tell

感谢您的任何帮助

4

0 回答 0