Hide Folders and Files Using System File Attribute

Hide folders and files (AppData ntuser)I like keeping my folders tidy. In Windows XP, it's an easier task because there aren't many things in the user directory that can make things look cluttered. However, in Vista, there are three things that I just can't stand looking at: the AppData folder and the ntuser.dat.LOG files. There is simply no need for me to mess with the ntuser.dat.LOG files, and I hardly need to access files in AppData. I can't delete them, so I hide them.

Just a note before going on: The following instructions rely on a setting in Vista. The key is to have "Hide protected operating system files (Recommended)" checked. By default, this setting is already checked, but you can double check by clicking on "Organize" on any Windows Explorer window, and choosing "Folder and Search Options". On the "Folder Options" window, click the "View" tab and it should be as shown below.

Hide protected operating system files (recommended)

In some cases, I need access to files that are hidden by default and I've set Vista to show hidden files and folders, hence setting the "Hidden" attribute on folders and files isn't sufficient.

Moving on: Set the "System File" Attribute for files you want to hide

Now that you've set Vista to hide system files, we can use the command prompt to make folders and files have the "system file" attribute.

  1. Open a Command Prompt window. (Start->All Programs->Accessories->Command Prompt). For some files, this must be run with Administrator privileges . In that case, right click on Command Prompt, and click “Run as administrator.”
  2. By default it should already open in the "C:\Users\[your_username]" directory.
  3. Type "attrib +S +H AppData" to hide the AppData directory.
  4. Type "attrib +S +H ntuser.dat.LOG1" to hide ntuser.dat.LOG1.
  5. Type "attrib +S +H ntuser.dat.LOG2" to hide ntuser.dat.LOG2.
  6. Look at your user directory in Windows Explorer and they should not be showing anymore. (A refresh might be required to see the changes)

This should also work on any folder or file, and I don't find any reason why this wouldn't work in Windows XP or Windows 2000, but I could be wrong. If you're using another version of Windows, getting to the "Folder Options" might be a little different.

Also, be cautious when deleting folders and files. Remember the ones you've hidden!

If you ever need to undo this, simply substitute the "+S +H" with an "-S -H" in the instructions above.


Tags: , , ,

Bookmark and Share

Comments

Vlad
Jan 25, 2008 9:44 PM
Vlad The reason why I want those files to be seen at all times is because I used to always forget to unhide them when needed. So I gave up and left them all visible. Helps a little :)
Carlo
Jan 25, 2008 9:56 PM
Carlo Of course it this depends on how often you access AppData, etc. This wouldn't be too useful if you need access to the folders every so often.
gautam madeshia
Feb 1, 2008 7:54 AM
gautam madeshia i never like the os to hide any kind of file.

its one thing to lock and prevent the file from accidental deletion and another to completely hide the files :D
Kwafel
Feb 7, 2008 3:52 AM
Kwafel Although I myself prefer to see all my files, since I know what they do, I found this option to be a lifesaver when I was setting my mother's system. She is close to being computer illiterate and more than once has caused the system to crash and forced me to reinstall it. Guess what ? Not anymore!
infodotnet
May 5, 2008 10:24 PM
infodotnet Nice info,
I used to use Attrib to show hidden files caused by viruses, it's really useful tool from windows because we can't change files Attribute using file properties or change hidden option from Folder Option.

Btw it's a nice blog.
HOKSHA
May 1, 2009 7:38 AM
HOKSHA Thanks for this informations its very useful for me but the question is did this septs works in all microsoft windows or just in vista?
Thanks

Mohamad ElGammal
Carlo
May 2, 2009 12:57 AM
Carlo I believe it works with Windows 95 and up.
atzaz
Dec 10, 2009 6:13 AM
atzaz To,
The webmaster,
http://www.xiirus.net.
Sir,
I want this method for windows xp can you please help me publish this topic on your website or send me the links of other websites that have this topic. i shall be very thankful to you.

Yours Affectionately,
Atzaz Ahmed

Want to leave a comment?