设文本文件TXT1.TXT和TXT2.TXT
文件都是一行。输出为output.log.
一共3个批处理,只是习惯用多个外部文件来打断预处理这样容易分析问题。
GO.CMD:
FOR /F "tokens=1 delims=," %%a in (.\TXT1.TXT) do CALL Get2.CMD %%a
Get2.CMD:
SET P1=%1
SET TAG=0
FOR /F "tokens=1 delims=," %%a in (.\TXT2.txt) do CALL Create.cmd %%a
IF {%TAG%}=={0} Echo %part1%>> Output.log
Create.cmd:
Set P2=%1
If {%P1%}=={%P2%} Set TAG=1
文件都是一行。输出为output.log.
一共3个批处理,只是习惯用多个外部文件来打断预处理这样容易分析问题。
GO.CMD:
FOR /F "tokens=1 delims=," %%a in (.\TXT1.TXT) do CALL Get2.CMD %%a
Get2.CMD:
SET P1=%1
SET TAG=0
FOR /F "tokens=1 delims=," %%a in (.\TXT2.txt) do CALL Create.cmd %%a
IF {%TAG%}=={0} Echo %part1%>> Output.log
Create.cmd:
Set P2=%1
If {%P1%}=={%P2%} Set TAG=1