e.g. to use findstr to look in device1.txt and find "Hardware" & "Serial Number" and then output those to a text file on the same line. So in the end I should have an output text file with one line for each file that was searched with the 2 results in.
e.g.
device1.txt Hardware: xyz Serial Number 1234
device2.txt Hardware: abc Serial Number 5678
Any help appreciated on this. I have been messing around a bit and not really getting anywhere. Here is an example of what I was trying..
for /F "delims=" %%a in ('findstr /s "Hardware:" *.txt') do (
set var1=%%a
echo %var1% >> %temp%\output.txt
)
Something like that but I need both results shown on one line.
Help!
Thanks
