2017-09-13 66 views
0

代碼嘗試使用AppleScript

tell application "Finder" 
    make new folder at "iCloud Drive: Documents" with properties {name:"my Folder"} 
end tell 

錯誤信息來創建特定的位置文件夾時收到錯誤

error "Finder got an error: AppleEvent handler failed." number -10000

系統概述

Macbook Pro:MacOS Sierra 10.12.6

回答

0

iCloud Drive不是物理磁盤。只需使用標準documents folder

set documentsFolder to path to documents folder 
tell application "Finder" 
    make new folder at documentsFolder with properties {name:"my Folder"} 
end tell 
+0

新來的AppleScript和使用這項服務大力發佈之前,研究可能的解決方案教訓了最後一次。我不知道我會在哪裏瞭解到我無法設置iCloud路徑,因爲它不是物理磁盤。一旦你說出來,它就非常有意義,但是我從來沒有想過這件事。感謝您的幫助!我感謝你的時間和考慮。 –