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

croberts134

macrumors newbie
Original poster
Nov 3, 2005
15
0
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?!?
 
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
 
Doctor Q said:
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.
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?
 
Doctor Q said:
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

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.
 
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"!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.