hiding folders

Discussion in 'macOS' started by croberts134, Dec 5, 2005.

  1. croberts134 macrumors newbie

    Joined:
    Nov 3, 2005
    #1
    I'm very new to using terminal to do things, but I've read about using SetFile to hide folders. I just can't get it to work!

    I'm looking to hide my Microsoft User Data folder and the Eudora Folder that are placed in documents.

    Right now according to Get Info, they are located at /Users/Chris/Documents

    So, in terminal, I tried this:

    /Developer/Tools/SetFile -a V /Users/Chris/Documents/Eudora Folder

    And I get this response:
    ERROR: File Not Found. (-43) on file: /Users/Chris/Documents/Eudora
    ERROR: File Not Found. (-43) on file: Folder

    What could I be doing wrong?!?
     
  2. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #2
    It is confused by the spaces in the folder name. In Terminal, spaces in filenames must be hidden from the command parser. There are two ways to do that: by enclosing the filename in quotes or by using the backslash character as an "escape" character.

    So try either of these:

    /Developer/Tools/SetFile -a V "/Users/Chris/Documents/Eudora Folder"

    /Developer/Tools/SetFile -a V /Users/Chris/Documents/Eudora\ Folder
     
  3. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
  4. HiRez macrumors 603

    HiRez

    Joined:
    Jan 6, 2004
    Location:
    Western US
    #4
    Is there any way to force Terminal to globally display filenames in quotes rather than using escaped notation? For example, if you use tab-completion for a filename, or for command-line output from something like grep?
     
  5. croberts134 thread starter macrumors newbie

    Joined:
    Nov 3, 2005
    #5
    Thanks so much! It worked perfect on the first time. I no longer have to see these stupid folders everytime I open the documents folder.
     
  6. yellow Moderator emeritus

    yellow

    Joined:
    Oct 21, 2003
    Location:
    Portland, OR
    #6
    Hmmm I don't think there's a shell out there that will do that.
     
  7. Doctor Q Administrator

    Doctor Q

    Staff Member

    Joined:
    Sep 19, 2002
    Location:
    Los Angeles
    #7
    I don't think so either, but there is a handy trick you can use for file and folder names. If you open a Finder window and drag a file or folder into the Terminal window, it will type the name for you and include the backslash "escape" characters where needed.

    For example, you could type
    /Developer/Tools/SetFile -a V​
    press the space bar, drag the Eudora Folder folder into the Terminal window, switch the focus back to the Terminal window, and then press return. The command would read
    /Developer/Tools/SetFile -a V /Users/Chris/Documents/Eudora\ Folder​
    If you had file SetFile visible in a Finder window (of the /Developer/Tools folder), you could even drag that file in instead of typing "/Developer/Tools/SetFile"!
     

Share This Page