Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

richard.mac

macrumors 603
Original poster
Feb 2, 2007
6,292
5
51.50024, -0.12662
I want to make an Automator plug-in to hide/unhide a single Finder item. atm i have two plug-ins which are shown below.

Picture 1.png Picture 2.png

how would i change the shell script to have just one plug-in? im thinking this loop

if "hidden"
do chflags hidden "$@"
else
do chflags nohidden "$@"

would do the job but im not too sure on how to do shell script loops.
 
im thinking maybe i shouldnt have a single action to unhide a file as i wouldnt be able to click on it when invisible files are hidden. instead i should just use the show/hide invisible files action i have and then the unhide action.

unless i could somehow make an action that shows a open file window (with hidden files shown) when an empty space is clicked then you could unhide a file from there.

here is my show/hide invisible files action if anyone wants it. unzip and place in ~/Library/Workflows/Applications/Finder.
 

Attachments

  • Invisible files.zip
    55.5 KB · Views: 353
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.