Solved

Search for a string in any file in a specified directory

Posted on 2013-01-23
4
284 Views
Last Modified: 2013-01-29
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?
0
Comment
Question by:elwayisgod
4 Comments
 
LVL 74

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 38810653
Do you really need VBScript for this? The findstr command does this already.

e.g.

findstr /s "to find" *.*

Open in new window

0
 

Author Comment

by:elwayisgod
ID: 38810683
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
 
LVL 51

Expert Comment

by:Bill Prew
ID: 38811368
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
 
LVL 9

Expert Comment

by:shorvath
ID: 38816371
Freeware solution

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

been using this for years....
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

I have published numerous articles here at Experts Exchange that present programs/scripts written in a language called AutoHotkey. Each of those articles has a brief paragraph describing where to download the product and how to install it. I have al…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now