I'm on Yosemite, and I want to toggle hide/show all the hidden files on a Mac.
Every-time, I want to do that I have to go to Terminal.app and run these command :
To show
defaults write com.apple.finder AppleShowAllFiles TRUE
To hide
defaults write com.apple.finder AppleShowAllFiles FALSE
I'm wondering if there is a better tweak out there that accomplish this in just a click of a button.
Locate the files you want to hide. For easy access to these files, use the Finder feature on your Mac. Simultaneously, press Shift+CMD+Period (.) to hide the files. This procedure will not only hide your files, but it is also helpful when you want to access hidden files.
Showing hidden files via Mac Finder Open the folder where you want to search for hidden files. Press the “Command” + “Shift” + “.” (period) keys at the same time. The hidden files will show up as translucent in the folder.
Select the Start button, then select Control Panel > Appearance and Personalization. Select Folder Options, then select the View tab. Under Advanced settings, select Show hidden files, folders, and drives, and then select OK.
I prefer using this shortcut:
⌘ CMD+⇧ SHIFT+.
Update, considering all comments:
try
set state to (do shell script "defaults read com.apple.finder AppleShowAllFiles") as boolean
on error
set state to false
end try
do shell script "defaults write com.apple.finder AppleShowAllFiles " & (not state)
try
tell application "Finder"
set w to front window
set t to (get target of w)
if t is not startup disk then
set the target of w to startup disk
else
set the target of w to home
end if
set the target of w to t
end tell
end try
tell application (path to frontmost application as text)
display notification "ShowAllFiles is now " & (not state)
end tell
Export the script as app and cmd-drag the app to the Finder window toolbar.
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