How do I search EVERY file name in a certain directory in Windows 7?

1

2

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 MultiDoc.py. 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?

A Student at a University

Posted 2010-07-11T01:27:10.360

Reputation: 391

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 – 2010-07-11T01:40:28.210

I need to be able to do this on others' Win7 machines. – A Student at a University – 2010-07-11T01:44:35.490

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 – 2010-08-11T12:38:47.037

@Nitrodist: find is available on Windows, but it's *nix's grep. – Hello71 – 2010-08-29T18:26:23.497

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 – 2010-08-29T18:34:52.730

Answers

1

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.

A Student at a University

Posted 2010-07-11T01:27:10.360

Reputation: 391

1

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.

notpeter

Posted 2010-07-11T01:27:10.360

Reputation: 899

I need to use Windows Search. – A Student at a University – 2010-07-11T03:10:26.083

This is Extremely Slow. Hours. – A Student at a University – 2010-08-29T18:33:22.330

0

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.

Melvyn

Posted 2010-07-11T01:27:10.360

Reputation: 2 397

I need to use Windows Search. – A Student at a University – 2010-07-11T03:10:59.047

UAC elevated, which in fact mean that you're using the credentials of a user in the group administrator. – Melvyn – 2010-08-15T21:58:58.577

0

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.

paradroid

Posted 2010-07-11T01:27:10.360

Reputation: 20 970

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 – 2010-08-16T04:21:03.817

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 – 2010-08-29T18:29:07.160

0

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.

http://www.thelongclimb.com/win7powersearch.pdf

barlop

Posted 2010-07-11T01:27:10.360

Reputation: 18 677

"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 – 2010-08-23T09:47:42.130

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 – 2010-08-29T18:33:01.847

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 – 2010-08-30T09:27:50.007

0

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!

zbstof

Posted 2010-07-11T01:27:10.360

Reputation: 2 721