Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

How do I search EVERY file name in a certain directory (for example C:\) for a certain character string (for example obscure.dll) in Windows 7? For instance, Start Menu search does not find files in C:\WINDOWS or my ~\AppData directory.

I'm looking for a method that utilizes the built-in search of Win7, without installing Cygwin or other major system-level changes, and without using incredibly slow command line tools. I want to know aht incantation will search all filenames in a specified directory.

Again, I am trying to search (not necessarily index) ALL file names in all subdirectories of an arbitrary directory, not just some extensions or some directories. If I tell it to INDEX the whole drive, it will index the CONTENTS of those files. I just want to know what magic incantation to add to my search of a directory to search every file name in it.

As another example, I was searching for MultiDoc and multidoc in the right-corner search box in Windows Explorer inside of the just unpacked C:\Users\myname\Downloads\afolder\subdir where several subdirectories of that contained a My search returned no results. Why?

There has to be a way to search all file names in a directory just as one does in Windows XP. What is it?

share|improve this question
I'd really suggest Cygwin in this case if you're already familiar with Linux or want an extremely powerful search program. Using the find command is just invaluable. You can also use regular expressions with the find command. You can achieve what you want with something like this: find /cygdrive/c/ -iname '*file name to search*' -depth 1 – Nitrodist Jul 11 '10 at 1:40
I need to be able to do this on others' Win7 machines. – A Student at a University Jul 11 '10 at 1:44
The Windows 7 Search won't let you search all of C:\WINDOWS. Even the wonderful Search Everything Engine fails there. Feel good: It's in the name of security & stability. – harrymc Aug 11 '10 at 12:38
@Nitrodist: find is available on Windows, but it's *nix's grep. – Hello71 Aug 29 '10 at 18:26
How can I feel good when I want to find my code on my drive, or someone else's lost doc or py file on their Win7 drive, and there is no tool that can do so in a reasonable amount of time? – A Student at a University Aug 29 '10 at 18:34

It won't be fast, but dir /s from command prompt can do this. For example:

dir twain_32*.* /s

You might need to start your command prompt as an administrator, but most things even in C:\Windows will be visible as a normal user.

share|improve this answer
I need to use Windows Search. – A Student at a University Jul 11 '10 at 3:10
This is Extremely Slow. Hours. – A Student at a University Aug 29 '10 at 18:33
up vote 1 down vote accepted

Use Search Everything Portable from a USB key. It searches every file name on the entire disk in less than a second.

Unfortunately, I don't know of a way to search properly using the built-in search in Windows 7.

share|improve this answer

You must have administrator rights to sniff in C:\Windows or any other system folder.

Try typing find /? to get help on that command in Windows 7.

By the way you can download Subsystem for Unix-based applications in Windows 7 professional and ultimate. Go to Programs and features then Turn windows featurs on or off. You'll get unix utilities which will help you like Nitrodist told.

And don't forget windows power shell.

Three ways you can use to find. Just look on their help.

share|improve this answer
I need to use Windows Search. – A Student at a University Jul 11 '10 at 3:10
UAC elevated, which in fact mean that you're using the credentials of a user in the group administrator. – Melvyn Aug 15 '10 at 21:58

I you have to use Windows Search, try typing Indexing Options in the Start Menu search box and go to the Advanced settings. Make sure that all the locations and file types you need to search are being indexed.

share|improve this answer
I don't want to index the contents of the entire drive. It's not designed for indexing that much file content. I just want to be able to search the file names in an arbitrary folder I specify, with arbitrary file types, indexed or not. – A Student at a University Aug 16 '10 at 4:21
This only indexes extensions listed, and indexes the CONTENTS of most of those extensions. I want to search ALL file names, not just some extensions, and I do not want to index the CONTENTS of the entire hard drive, as this is a Bad Idea due to the size of all those files, and due to not needing that in the first place. – A Student at a University Aug 29 '10 at 18:29

I believe you need to look up Windows Search Advanced Query Syntax.

The one you are looking for is "file:" or "filename:".

For example your query should look like: "file:obscure.dll" or "file:obscure ext:.dll". This second switch makes it search only files with extension ".dll".

There are other switches you may be missing from Windows XP search, like, "date:", "size:", media type "kind:videos/music/docs/pictures/..." by containing folder name "path:/under:/folder:" and by aforementioned extension "ext:". There are many more but these are the most useful ones.

And of course don't forget about Ctrl+F shortcut in explorer to quickly navigate to search bar!

share|improve this answer

Would any options in here help?

Control Panel → Folder Options

enter image description here

e.g. "include subfolders" and "partial matches".

Maybe the "partial matches" checkbox isn't currently checked on your computer.

This may help: apparently the Windows 7 search uses AQS (advanced query syntax) - you may or may not need that, but it might help.

share|improve this answer
"Partial matches" is, of course, checked, as it is by default, as is "Include subfolders". These are stock Win 7 machines. There are no AQS options I see to cause searching every file name in a directory. – A Student at a University Aug 23 '10 at 9:47
If this is somehow working for someone else to search the file names of new files of new file types in a non-indexed directory when searching from above (a possibly indexed directory), let me know. IT sure doesn't do this for me. – A Student at a University Aug 29 '10 at 18:33
I don't have W7 to test this, but you could try this.. I found googling about windows7 search being broken "Open the Search and Indexing troubleshooter by clicking the Start button, and then clicking Control Panel. In the search box, type troubleshooter, and then click Troubleshooting. Click View all, and then click Search and Indexing. Depending on the severity of the problem, the Search and Indexing troubleshooter might need to restart the Windows Search service." – barlop Aug 30 '10 at 9:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .