Search for a string in any file in a specified directory

Hi,

I need to search all files in a specified directory that contain a string 'test string'.  It needs to search all sub directories etc.   Then the results need to give me the path and filename of all the files that contain that string.

Is that possible?
elwayisgodAsked:
Who is Participating?
 
käµfm³d 👽Commented:
Do you really need VBScript for this? The findstr command does this already.

e.g.

findstr /s "to find" *.*

Open in new window

0
 
elwayisgodAuthor Commented:
NO.  I will take VB or Dos doesn't matter.  I'm trying to manually find this directory referenced in files but there are way to many.......
0
 
Bill PrewCommented:
FINDSTR a good tool to give a try.  You can do FINDSTR /? at a command line to see the various options (like /I to ignore case, etc).

Sounds like you might want the /M option to just get a list of the file names, not all the hits.

~bp
0
 
shorvathCommented:
Freeware solution

http://www.mythicsoft.com/page.aspx?type=agentransack&page=home

been using this for years....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.