Automator plug-in to hide/unhide files

Discussion in 'Mac Programming' started by richard.mac, Aug 14, 2009.

  1. richard.mac macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #1
    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.
     
  2. richard.mac thread starter macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #2
    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.
     

    Attached Files:

  3. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #3
    Hide Folders will do this too. Though, it does it by adding a . in front the name.
     
  4. richard.mac thread starter macrumors 603

    richard.mac

    Joined:
    Feb 2, 2007
    Location:
    51.50024, -0.12662
    #4
    thanks. though i wanted to do this with Automator so with out a third party app.
     

Share This Page