Here's what I need. I need a folder action that hides files according to their extensions. (I do not need a folder action that hides extensions for visible files.) This action needs to apply to every file in the folder and to every file that is added to the folder in the future.

Assistance for a similar task was asked for here, but that was solved with a smart folders workaround that does not work for me because I cannot use a smart folder in this context. Another similar task was asked for here. In response, the moderator bmike said that pieces for this folder action I have described could be put together from other articles on this site. I have been unable to do so. My need for this folder action is also not unique to LaTeX and so the other solutions discussed there will not be of any use. So what I'm looking for has not been resolved elsewhere.

I have tried two things. Initially, I tried to model what was shown here. First, I created an .app through Automator that runs this shell script:

find /Users/USER/FOLDER/* -iname *.EXTENSION -execdir chflags hidden {} \;    

Second, I created a script that run the following commands:

on adding folder items to this_folder after receiving added_items tell application "Mac OS X:Users:USER:Library:Workflows:Applications:Folder Actions:FIRSTSTEP.app" open added_items end tell end adding folder items to 

As I understand it, this runs the previous Automator app every time something is added to the folder with the action. Finally, I added this script as a folder action to the folder which needs to exhibit the behavior in question.

But this didn't work for me. Any idea what's going wrong?

I have also tried using Hazel to simply run the shell script on the folder. This works to hide the file when it is added to the folder the first time a file is added, but any later file added doesn't work. The error that is given is "Shellscript exited with non-successful status code: 1."

1 Answer 1


Here you go. It works just fine on Snow Leopard.

Autohide files

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .