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.
Here is what I have tried in terms of shell scripting. 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. What am I doing wrong? Is there any way to simplify what I'm attempting to do?
Aucun commentaire:
Enregistrer un commentaire