Windows Search Function - How Do I Capture the Results?

The Windows “Search … for Files or Folders” function produces a list of files that satisfy some user-entered criteria.

How can I capture the list of file names that appears on the right side of the Search window as text? I don’t want the contents of the found files. I just want to get that list of file names into a text file.

As far as I know you can’t capture the results of the Windows search box into a file. However, you can do more or less the same thing from DOS if you’re just searching for certain filenames.

If you type


dir *.exe /b /s

it will list all executable files in the current folder and its subfolders. You can direct this output to a file by using the “>” operator:


dir *.exe /b /s > FileList.txt

If you need to search on the content of the files as well then I think you’re into more difficult territory.

DOS is a good way to go, as Armilla suggests.

But if you’re more comfortable with Windows, you can use WinDirLister or similar software.

You can take a screenshot of the window by hitting alt+print screen, then paste it into the Paint program that comes free with any Windows OS. It’s not a text-readable format, but it can be printed out.