Shell scripting in AppleScript will do the job.
Like this:
Code:
set buttonpressed to button returned of (display dialog "Show Hidden Files?" buttons {"Yes", "No"})
try
if the buttonpressed is "No" then do shell script "defaults write com.apple.finder AppleShowAllFiles OFF"
if the buttonpressed is "Yes" then do shell script "defaults write com.apple.finder AppleShowAllFiles ON"
do shell script "killall Finder"
end try
If you want to limit the effect to one file or folder only, you could shellscript the addition or elimination of a leading '.' from a single filename.
Hide Folders is a freeware app for Mac OS X dedicated to protect documents and folders. With a click, conceals files and folders with all their contents. The application is simple and natural to use because it works just as you are used to do things everyday with your Mac. With this app you will protect your files avoiding them to be being modified, seen or erased by other users.
Secret Folder looks like a good simple piece of software to use. I will look into this.
One further question, i have moved a hidden file over from a different HDD, with a can make visible using the terminal commands etc, but how do I make this permanently visable and not in a 'hidden' state?
One further question, i have moved a hidden file over from a different HDD, with a can make visible using the terminal commands etc, but how do I make this permanently visable and not in a 'hidden' state?
I am sure you can do it with a Terminal command but I will let someone else give you the exact syntax....or Secret Folder will do it. You will have to drag it to Secret Folder, which will then give the option to make it visible or invisible.
Note "dragging it into Secret Folder" is not moving the file from it's location, but bringing it under the control of Secret Folder in its present location.