I have a log file which I need to read in, line by line and pipe the line to a next loop.
Firstly I grep the logfile for the \"main\" word (like \"error\") in a sep
This has worked for me in the past and it will even expand environment variables in the file if it can.
for /F "delims=" %%a in (LogName.txt) do ( echo %%a>>MyDestination.txt )