How to find hidden files?

Not open for further replies.


Posts: 154   +1
Can I search by file attributes (other than the standard size and date created etc.) in XP? There is an old hidden file that I would like to find, but I can't remember the file name or location, so I would like to search for all hidden files on the drive. Is there syntax for doing that in Search?


P.S. Internet search results indicated that running "attrib" in DOS might be able to do this, but when I try to run this the DOS window flashes momentarily and then disappears. I remember this happening with a DOS program once before and someone telling me how to get the window to stay open, but for the life of me I can't remember what I need to do. :(


Posts: 154   +1
CCT said:
You start with cmd /k
OK, thanks. The cmd window stays open now. But it looks like attrib can only add or remove file settings and not search for them? E.g., you can set files/folders to +H to hide them, or -H to unhide them, but I can't figure out a way to search for files that are already set as "H."

Can anyone help me with this?

Thanks. :)


Posts: 2,610   +6
In XP Pro I think this is how you 'could' do it for a manual search:

In Windows Explorer, Tools, Folder Options, View, clear the box for 'remember each folders view settings'

In Windows Explorer, click on C: (root), View, Choose details and include 'attributes'

In Windows Explorer, Tools, Folder Options, View, click the box for 'show hidden files and folders' and uncheck the box for 'hide protected operating system files' and then click on 'Apply to All Folders'.


Posts: 154   +1
Hmm. Looks like a step in the right direction. I have never displayed the "Attributes" attribute in Explorer before.

But this still leaves me needing to visually search through every folder on the drive to find a lost file. There has got to be some syntax that you can use in the Search tool, like "$attrib=H" or something that can do this for the drive.

The computer knows which files are hidden.
The computer knows how to search for files based on certain attributes.

So why this glaring oversight? Why can't I make use of these two functions together? I know they don't want you screwing up your computer by deleting important protected files, but for criminy's sake there should at least be some convoluted syntax that non-beginners can use to perform this search. :mad:

And unfortunately I don't have XP Pro, so I don't know if your suggestion would work on that platform, CCT, but I appreciate your suggestions. :)


Posts: 16,314   +36
Seems to me that you could set the View to 'show hidden files and folders' as mentioned, then search by the desired attributes.


there are multiple methods used to hide files, the attribute is the original and obvious one.
the newer technique is to use names like $xyz$

in either case, if you set View Hidden Files as the folder option and allow it for ALL FOLDERS,
you get to see these files in the Explorer.

The sole remaining issue then is access to the special folders, like
System Volume Information which holds the Restore Points.


Posts: 823   +3
Using the command prompt window gets past some of the omissions designed into Windows Explorer.

Command Prompt [discussed in previous post]
Start | Run | cmd /k
Change to the root directory
cd \
The root directory
List Hidden files in the current directory and save in file.
C:\>dir /ah >c:\tmp.txt
List Hidden files in the specified directory and its sub-directories and APPEND to file.
C:\>dir c:\windows\system32 /s /ah >>c:\tmp.txt
Edit file
C:\>edit tmp.txt


Posts: 2,610   +6
rf6647 was almost spot on - after you get the c:\> prompt. use 'dir c:\*.* /s /ah >>c:\tmp.txt'


Posts: 823   +3
xxcopy method

XXcopy is a massive utility - and it's freeware.
It does a massive amount of work - AND - it permits you to massively screw up!
Its listing function (/L) is safe to use.

Sample usage: <command prompt window>
xxcopy c:\ /s /x$*  /xwindows\ /x*.ini /x*.exe /ho /fmal /foc:\tmpxx.txt /L
<Explanation> Beginning in Root (c:\), including all subdirectories (/s), but excluding (/x) windows directory, or files beginning $, or files .ini, or files .exe , and it must be hidden or system (/ho), List files (/L) and save results (/fo) to file c:\tmpxx.txt showing attributes and long file names (/fmal).

Sample Results <file tmpxx.txt>
 HSR   C:\cmldr
AHS    C:\hiberfil.sys
AH     C:\hpothb07.dat
AH     C:\hpothb07.tif
AHSR   C:\ntldr
AHS    C:\pagefile.sys
AH     C:\cmdcons\hpothb07.dat
AH     C:\cmdcons\hpothb07.tif

Freeware available from
It takes a 2-step installation process that seems very redundant. Following the 1st setup, run the command as shown & repeat all the acceptance of agreements.

Remember the 'esc' key to abort command execution. The switch (/L) restricts the utility to a List function - completely safe. If xxcopy throws a caution at you, read it carefully.


Posts: 154   +1

I am scared by it permits you to massively screw up!, so I think I will stick to the cmd search (works great!) because I am a wuss. :)

And FYI, displaying the attributes seems mostly useless other than as a learning exercise. When I tried to do anything with that column, including simply sorting by it to try to make the scrolling examination of the search results a little faster, it rarely worked, especially if the list of returned files was long. So pretty useless.


Posts: 2,419   +77
Staying (just) on topic about searching. Be aware that the built-in windows search engine will only search for text in a very limited number of file types - basically those which can be edited by Office, Works and notepad.

There is other search software available, but none very simple and straightforward. Some require you to build and maintain inexes (which XP also wants you to do, but I turn it off), or the interface is just appaling or lacks boolean search terms.

The best I found is built into powerdesk pro - a commencial package from ontrack. It is not too expensive and in my opinion worth every penny for the wide range of extra facilities over Windows explorer
Not open for further replies.