I just got my MBP with Retina and i'm really new to the Mac OS X (using PC before). I noticed that the Mac doesn't have a GUI to show/hide hidden files like Windows. I've researched and saw this site Show Hidden Files on your Mac. And yes, it works.
To show hidden files:
(Using Terminal)
defaults write com.apple.finder AppleShowAllFiles TRUE killall Finder
To hide hidden files:
defaults write com.apple.finder AppleShowAllFiles FALSE killall Finder
What i wanted to do is to make an executable script that will perform the above commands when i double-click it so that i don't have to type commands in Terminal in order for me to show/hide hidden files. I saw Applescript but i'm not very familiar with it. I don't know the commands to perform what i want. But i've read some.
Can someone please help me make an executable script that will show/hide hidden files in my Mac?
You don't need script anymore. Open the finder, press ⌘ + ⇧ Shift + . and it will show/hide your files.
display dialog "Show all files" buttons {"TRUE", "FALSE"}
set result to button returned of result
if result is equal to "TRUE" then
do shell script "defaults write com.apple.finder AppleShowAllFiles -boolean true"
else
do shell script "defaults delete com.apple.finder AppleShowAllFiles"
end if
do shell script "killall Finder"
Use AppleScript editor and save as application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With