Searching for a string inside multiple files

LCBXX

Honorary Master
Joined
Apr 11, 2006
Messages
25,113
Reaction score
16,518
Location
Little Falls
Is there a way to configure XP/Vista's search function so that it can search for a string/value/etc inside a specifies list of files? Any help will be appreciated.
 
Not that I know off, maybe by putting all the files in one directory, and then only searching in that directory?

Another way, is to install cygwin, and use a bash script :)
 
Windows Desktop Search 4.0 does this quite nicely. Fantastic replacement for the default XP search, too. Vista has it built into the advanced search options.
 
try the trial of a little program called Ultraedit

it has a similar functionality that Visual Studio also has, search in files in specified folder and stuff like that.

other than that, what the other guys suggested :)
 
I use TextPad, it has a 'find in files' function.
And it has configurable syntax highlighting for tons of languages.
 
Last edited:
If you use the command line, then this works well too.

I normally redirect for easy access later so:

C:\>find /I /N "test" C:\temp\* > result.txt
Will show all the files and the line that contain "test" (case-insensitive) for files that are in the c:\temp folder. It will create a file called result.txt with the info.


-----------------------------------------------
C:\>find /?
Searches for a text string in a file or files.

FIND [/V] [/C] [/N] [/I] [/OFF[LINE]] "string" [[drive:][path]filename[ ...]]

/V Displays all lines NOT containing the specified string.
/C Displays only the count of lines containing the string.
/N Displays line numbers with the displayed lines.
/I Ignores the case of characters when searching for the string.
/OFF[LINE] Do not skip files with offline attribute set.
"string" Specifies the text string to find.
[drive:][path]filename
Specifies a file or files to search.

If a path is not specified, FIND searches the text typed at the prompt
or piped from another command.
 
Find does not do sub-directories .. or does it now?
I also use Texpad (registered). I woz wondering if anybody still used that.

+1 for textpad for day to day use.

I used find if I need to write a quick batch script to do something clever.
 
Top
Sign up to the MyBroadband newsletter
X