You can try
http://www.wingrep.com/ (Windows Grep, which is very good), or
MS-DOS "findstr" that comes with Vista/XP (not very powerful), or some other
3rd party grep tool.
Or you can download Perl for windows and use the provided script (not very
powerful. just whipped it up in a few minutes and did some minor testing)
http://www.activestate.com/store/productdetail.aspx?prdGuid=81fbce82-6bd5-49bc-a915-08d58c2648ca
#---BEGIN SCRIPT-------------------------------------------------------------
# Usage: perl findtext.pl <regular expression (perl format)> <search path>
#
# Example (see
http://www.comp.leeds.ac.uk/Perl/matching.html for regex info):
#
# perl findtext.pl "Administrator" C:\
#
# Output:
#
# <file>:<line number>:<single space><line where regex was found>
use strict;
# Searches for regex in given file.
sub FindString($ $)
{
my $regex = $_[0];
my $file = $_[1];
my $lineNumber = 1;
open(my $SRC, "<$file");
while(<$SRC>) {
if(/$regex/) {
if(/[\x00-\x08\x0B\x0C\x0E-\x1F\x80-\xFF]/) {
print "binary file \"$file\" matches\n";
return;
} else {
print "$file:$lineNumber: $_";
}
}
++$lineNumber;
}
}
# Searches for files in given path and goes into sub directories recursively.
sub Search($ $)
{
my $regex = $_[0];
my $path = $_[1];
$path =~ s/\\$//;
$path .= "\\";
my @files = split(/\n/, `dir /b \"$path\"`);
my @folders;
foreach my $file (@files) {
my $fullPath = $path . $file;
if(-d $fullPath) {
Search($regex, $fullPath);
} else {
FindString($regex, $fullPath);
}
}
}
# Main.
{
if(@ARGV != 2) {
print "usage: $0 <regular expression> <search path>\n" .
"\nExample (see
http://www.comp.leeds.ac.uk/Perl/matching.html " .
"for regex info):\n" .
"\n\tperl findtext.pl \"Administrator\" \"C:\\Windows\"\n" .
"\nOutput:\n" .
"\n\t<file>:<line number>:<single space><line where regex was found>\n";
exit 1;
}
my $regex = $ARGV[0];
my $path = $ARGV[1];
Search($regex, $path);
}
#---END SCRIPT---------------------------------------------------------------