Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I have a user who hid a folder in XP, after they did this the folder no longer showed up in the directory. They thought this was a great feature and persisted to do this to a few personal folders and files on there work computer so that they would be hidden from the administrator (me). Now they want to access them and have no idea how to. That part is fine, since I can quickly pop on and see the 'hidden' folders and files.

The issue I now have is that the user can't remember where some of these hidden folders and files are now. They 'need' them ASAP, but I have no idea what to do. Not only do they not know the directory of the hidden folder, they don't know the name of it. I've been searching the web the last few hours to try and find a solution to filtering search result's to simply hidden folders, but haven't had any luck.

So is there a way to, in windows search (or in programming), to filter search results to folder / files that have the hidden attribute?

I'd like an XP specific solution, but I can also search and access the PC in Windows 7 and 8. I'm also pretty good a python, so a solution including code would also work.

share|improve this question

marked as duplicate by CharlieRB, Ƭᴇcʜιᴇ007, Kevin Panko, Moses, Jeff F. Apr 18 '14 at 19:49

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Some how that answer was deleted? Didn't work, but still. – Cody Brown Apr 17 '14 at 16:36
Doesn't ctrl + h work to toggle showing the hidden files? I think I remember using it back when I was on Windows... – Izkata Apr 17 '14 at 18:30
I love how this became your urgent problem. You should have let them sweat it out while you back-burnered their help request unless of course this was someone on the executive team. – MonkeyZeus Apr 18 '14 at 16:12
@MonkeyZeus she's the Company CEO. So I need to make her happy. Sadly I can never vent my frustration and tell her how technically illiterate she is lol. – Cody Brown Apr 18 '14 at 19:55
up vote 25 down vote accepted

I think that this would work. I do not have an XP box onhand to test, but this works correctly on Windows 7. Just change C: to the directory you want to check and it will give you a list of all hidden folders minus system folders.

dir C:\ /ahd-s /s /b /p 

I forgot to mention you have to run this from cmd.exe and you can always do something like

dir C:\ /ahd-s /s /b > c:\list.txt

to direct all output into a text file for easier viewing.

If you want the search to include all hidden files as well, but not system files, change the command to

dir C:\ /ah-s /s /b /p

/a means only show us files with the following attributes. We add /ah to specify hidden files only, /ahd would only be hidden directories and /ahd-s would be hidden directories only excluding system files (-s)

share|improve this answer
Works great! It only finds folders, which is great, but for interest sake, what part of that line would I change to search folders and files? – Cody Brown Apr 17 '14 at 17:01
Edited to answer your question – Chris Disbro Apr 17 '14 at 17:08
Beauty thanks @ChrisDisbro – Cody Brown Apr 17 '14 at 17:41

Did you consider unhide all folder at once for those users by command line {attrib -h /s /d location/.} ?

Because you may also educate them to administrate well their folders by this chance. It should not be a work load in your side in long term as adminstrator. Also even they hide it, you can discover them then their hidden strategy have no point.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.