【发布时间】:2016-04-05 20:46:00
【问题描述】:
是什么以及为什么 在 Finder 中,我希望能够通过简单的右键单击来隐藏任何文件/文件夹,无论是否需要 sudo。
已经采取的步骤: 经过一堆试验后,我选择了一个运行 AppleScript 的 Automator 服务
on run {input, parameters}
set filehide1 to {}
repeat with filehide2 in input
set end of filehide1 to POSIX path of filehide2
end repeat
do shell script "chflags hidden " & quote & filehide1 & quote with administrator privileges
end run
问题: 因此,仅当一次选择一个项目时,该脚本才能以目前的形式工作。无论是 1 个文件还是 500 个文件,我如何调整 Automator / AppleScript 以使其正常工作?
【问题讨论】:
标签: macos shell applescript osx-yosemite automator