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

honorfield

macrumors newbie
Original poster
Hey there!

I'm new with the mac. I'd like to hide some of the folders in my Documents folder (Adobe, Microsoft User Data, ...). I found already the solution for it with writing the following lines in command line:

sudo chflags hidden ~/Documents/(whatever folder you want to hide)

But what if the folder has got a name with spaces like 'Microsoft User Data'?
When i type the address i get the following error:

110:~ appleuser$ sudo chflags hidden ~/Documents/Microsoft User Data
chflags: /Users/appleuser/Documents/Microsoft: No such file or directory
chflags: User: No such file or directory
chflags: Data: No such file or directory
110:~ appleuser$


Is there any solution? It would be so good for the peace of my mind to have this documents folder clean🙂

honorfield
 
put quotes around the folder name.

If you use AppleScript, it makes easier:

quoted form of Posix path of (variable pointing to folder)

mt
 
Great

Thanks so much, putting the folder name in quotes worked!!!

Can you also tell me a way to make them visible again, just in case i need it in the future (and to close this topic up🙂

Regards
honorfield
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.