Mac下显示\隐藏所有文件

显示Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool true
隐藏Mac隐藏文件的命令:defaults write com.apple.finder AppleShowAllFiles -bool false

脚本

tell application "Finder" to quittrydo shell script "defaults read com.apple.finder AppleShowAllFiles"set OnOff to resulton errorset OnOff to "0"end tryif OnOff = "0" thenset OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles 1"elseset OnOffCommand to "defaults write com.apple.finder AppleShowAllFiles 0"end ifdo shell script OnOffCommanddelay 1tell application "Finder" to launch

复制代码保存为*.scpt, 双击后选择运行就ok!

posted @ 2015-04-04 16:49  Heri  阅读(182)  评论(0)    收藏  举报