batch script - read line by line

前端 未结 4 2044
醉话见心
醉话见心 2020-11-29 02:48

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

4条回答
  •  野性不改
    2020-11-29 03:32

    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
    )
    

提交回复
热议问题