Sorry, al968. It is impossible to figure out what you want to accomplish.
find first file
set "path\name of the file" as variable
look for string
go on with the next file
What do you mean "as variable". As what variable? Should variable names be generated?
"find first file" Do you mean find the first file that contains the string or the first file on your hard drive.
Never mind how to solve the problem. Let us know what you want as an end result when the search is complete.
======Example
I would like a BAT file that will produce a text file containing the path/filename of all files on my computer containing a given string.
If I run MyBAT "apple banana" myfile.txt
Then at the end of the run, myfile.txt will contain
c:\abc\def.doc
c:\ghi\jkl\mno.txt
....
where those files contain the exact text "apple banana"
=========
Is that what you want, or what?
Mac