Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

Search for Files and Folders

share

migration rejected from stackoverflow.com Oct 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.

comments disabled on deleted / locked posts

22 Answers

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.

share
add comment

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.

share
add comment

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

share
add comment

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...

share
add comment

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

share
add comment

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

share
add comment

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

share
add comment

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.

share
add comment

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

share
show 1 more comment

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.

share
add comment

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

share
show 1 more comment

findstr /s [string] [files]

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

share
1  
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
show 1 more comment

Windows Grep - an excellent tool on Windows.

share
add comment

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

share
add comment

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".

share
add comment

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.

share
add comment

I haven't seen anyone recommend Copernicus yet.

share
show 1 more comment

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

share
add comment
dir /s *.php

Execute that in the directory you want to find stuff in and in subfolders.

share
2  
I don't have 100 to downvote you , but this doesn't answer the poster's question. –  sep332 Nov 6 '08 at 17:47
add comment

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

share
show 2 more comments

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

share
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.