Searching for a string inside multiple files

LCBXX

Honorary Master
Joined
Apr 11, 2006
Messages
16,901
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.
 

Nod

Executive Member
Joined
Jul 22, 2005
Messages
9,861
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 :)
 

Raithlin

Executive Member
Joined
Jan 4, 2005
Messages
5,040
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.
 

eye_suc

Expert Member
Joined
Feb 14, 2005
Messages
4,096
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 :)
 

stoke

Honorary Master
Joined
Aug 7, 2003
Messages
10,532
Google Desktop .... I have been spoilt by it. Takes a heck of a long time to index 90GB though.
 

charlie_82

Expert Member
Joined
Dec 11, 2007
Messages
2,993
Notepad++ (free)
It will let you search through all files in a particular folder
 

Bcm

Senior Member
Joined
Aug 2, 2005
Messages
687
I use TextPad, it has a 'find in files' function.
And it has configurable syntax highlighting for tons of languages.
 
Last edited:

Bcm

Senior Member
Joined
Aug 2, 2005
Messages
687
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.
 

stoke

Honorary Master
Joined
Aug 7, 2003
Messages
10,532
Find does not do sub-directories .. or does it now?
I also use Texpad (registered). I woz wondering if anybody still used that.
 

Bcm

Senior Member
Joined
Aug 2, 2005
Messages
687
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