I have a script to do a findstr, using an input file with a list of the various search terms, and spit the filename to an ouput file.
for /f "delims=" %%a in ('findstr /S /I /M /G:"X:\stringslisting.txt" *.doc') do (dir /s /b "%%~fa" >> X:\OutputFile.txt)
And it works fine, giving me a file with a list of all the path\filename\ of fils containing the strings as passed from the X:\stringslisting.txt file.
I want to be able to also output the searched string for each file.
(using "=" as the delimeter between the search term and the file it finds.
PROBLEM: I can't find how to get hold of the inputted search string during each iteration, to be ble to pump it to the output file !!
PLEASE HELP !!
Any assistace is greatly appreciated.
Many thanks, Eli from Oz