Folder action script to prompt for password

gphillipk

Registered
I'd like that when a certain folder is double clicked in Finder, a dialog box pops up to request a password before the folder is opened (similar to the dialog box that comes up when you choose to download something using Software Update or run Onyx). Does anybody have such a script? Alternatively, I need help with the scripts editor. I've noticed there's a record button and it does note which folder you click etc. How do I use it to achieve what I'd like to do?
 
It appears you want to create a 'on opening folder this_folder ... end opening folder' Folder Action Script.

One can be written to display a 'display dialog' box where a bulleted password would be entered. However, the 'display dialog' box would appear - after the window opened. The window could be quickly resized or moved, just prior to the 'display dialog' box appearance. After a valid password was entered, the window would then be resized or moved into view.

You cannot use 'Script Editor's 'Record' button to create a 'Folder Action Script'.

-----

Another way would be to create an AppleScript applet, which after a valid password was entered, would open a invisible folder's window. In this case, the icon of the script would be changed to that of a folder.
 
And Just FYI if you do this a user can just go to the terminal and type 'cd' and then 'ls' and see what is in there. So if you need this for real security, well this is not the way to go. My first guess would be an encrypted disk image but that might not get you the user experience you are going for.
 
Back
Top