# What's a good alternative to Windows' “Search for Files and Folders”? [closed]

The built-in Windows Search tool will apparently not search within PHP files. I cannot find the files named *.php containing text "some_function_name" that I know are there.

Search is complete. There are no results to display.

What's a good alternative to the built-in "Search for Files and Folders" tool in Windows?

-

## migration rejected from stackoverflow.comOct 26 '13 at 14:49

This question came from our site for professional and enthusiast programmers. Votes, comments, and answers are locked due to the question being closed here, but it may be eligible for editing and reopening on the site where it originated.

## closed as off-topic by random♦Oct 26 '13 at 14:49

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

## 21 Answers

findstr /s [string] [files]

findstr /? for more information, including the regex syntax you can use.

-
An example of usage would be: c:\> findstr /s /I /C:some_function_name" *.php /s is recursive search, /I is case-insensitive, /C is the string to look for. –  Joe Pineda Sep 30 '08 at 20:58

To get Windows Search to search all file types use Chris Sells' .reg file ("Filter Files With Unknown Extensions For XP")

-

I use the free version of Agent Ransack. It lets me use regular expressions and shows me the lines of the file that match.

-

Install Cygwin. Use grep. You also get the benefit of all the other cool Linux tools like vim and sed that will make your life easier and increase your productivity.

-

Windows Grep - an excellent tool on Windows.

-

Google Desktop. There's an addin that is great for text based files.

-

You can tell Windows Desktop Search to look in PHP files. It also doesn't look in CS files by default.

Go to Control Panels > Indexing Options > Advanced > File Types tab. On the bottom of the form, enter "php" and click "Add New Extension". Set the type to "Index Properties and File Contents".

-

Copernic Desktop Search is good. Same functionality as Google desktop search, but some people don't like the way GDS phones home. Unfortunately there was an app it didn't play nice with on my work machine, so I had to uninstall it.

-

Ack is a pretty nice command line tool implemented in Perl.

-

I haven't seen anyone recommend Copernicus yet.

-

You can just modify Windows XP to search ALL textual files for text. See Windows XP Search Bug.

-

If you have Notepad++ or Dreamweaver, they'll do that for you.

-

To search for files based on its contents I use Notepad++. Most of the time I already have it open anyway.

-

Try Spectate Swamp Desktop Search. That will fix you right up.

-

Try Everything. It seems to work pretty well and is free.

-

I don't have any trouble searching in PHP files on my Windows XP machine. It must be some strange setting excluding PHP files maybe. There is a shareware program called WindowsGrep that works pretty well.

-

Have you tried using grin? It's a command-line program written in Python. It runs under Windows, Cygwin, Linux, etc.

-

To solve this (and similar) problem(s), put this lines in a batch file (locate.bat):

@echo off
pushd \
echo.
echo PLEASE STAND BY: LOOKING FOR INSTANCES OF %1 ...
echo.
dir %1 /b /s /p
popd


If you place this batch somewhere on your path, it will work like the linux locate command and find matches within the current drive file system -- locate.bat *.php will work, for example...

-

Placer Search & Replacer searches PHP files and other files. It is pretty lightweight and fast.

-

Try OCMC filescanner - it is pretty fast and allows you to specify file extension, e.g. php and has database of more than 30 000 extension types.

-

I generally use PowerGrep however it is not free software and can be considered overkill for general file searches. However if you are a developer or info worker of any sort it is a powerful tool to have in your toolbox as it covers so much.

-