Compiler errors 新脚本:错误";Finder出现错误:Can’;无法获取文件夹
教科书中的一个练习让我感到困惑,示例脚本:Compiler errors 新脚本:错误";Finder出现错误:Can’;无法获取文件夹,compiler-errors,applescript,Compiler Errors,Applescript,教科书中的一个练习让我感到困惑,示例脚本: 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 modificat
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
脚本编辑器一直给我这样的结果:错误“Finder获得错误:无法从文件夹“Applications”中获取文件夹“Applications\”编号-1728
这是否与过时的进程或OS 10.11 security for Applications文件夹有关,或者我没有看到它。文件夹
Applications
是启动盘的子文件夹
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
文件夹应用程序
是启动盘的子文件夹
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