
August 25th, 2009, 01:44 AM
|
|
Registered User
|
|
Join Date: Aug 2009
Posts: 1
Time spent in forums: 2 h 24 m 6 sec
Reputation Power: 0
|
|
|
DOS Batch - Script for searching a string in a text file and copy the content to another file
HI
I need to search a string which is contained in a text file (for eg i have a .txt file containing a phrase "sample string" which i'll be searching using windows search. This will give me all the files in the base and nested directories which use this phrase.). Now the problem is that I have around 900 search strings and around equal no of folders. Can anyone please provide me the script for the following:
1) Search the files using the above mentioned method
2) Export the output for all the strings to another file. The output will basically be the file name and the path where in it is residing.
So in all i search a phrase, find all the files and list their names and their path in a separate file.
Thanks in advance 
|