2017-07-25 38 views
1

首次發佈到AppleScript的海報和neewbie,主要的願望是通過Capture One,LightRoom和Adobe應用程序改進我的攝影工作流程。課本有我難住了,例如劇本:新手腳本:錯誤「Finder遇到錯誤:無法獲取文件夾

tell application "Finder" 

    tell folder "AppleScript" of folder "Applications" 
     set file_list to name of every item 
     set time_folder_was_created to creation date 
     set time_folder_was_modified to modification date 

    end tell 
end tell 

腳本編輯器一直給我這樣的結果:錯誤「搜索得到了一個錯誤:無法獲取文件夾\」應用程序\號-1728從文件夾「應用程序「」 「

這是否與過時的進程或應用程序文件夾的操作系統10.11安全性有關或者我只是沒有看到它

感謝您的幫助和指導!

大衛

回答

0

文件夾Applications是的startup disk

tell application "Finder" 
    tell folder "AppleScript" of folder "Applications" of startup disk 
     set file_list to name of every item 
     set time_folder_was_created to creation date 
     set time_folder_was_modified to modification date 
    end tell 
end tell 

或具有相對路徑

set applicationsFolder to path to applications folder as text 
tell application "Finder" 
    tell folder "AppleScript" of folder applicationsFolder 
     set file_list to name of every item 
     set time_folder_was_created to creation date 
     set time_folder_was_modified to modification date 
    end tell 
end tell 
的子目錄
相關問題