1 @echo off 2 :loop 3 rand.exe>in.txt 4 test1.exe<in.txt>out1.txt 5 test2.exe<in.txt>out2.txt 6 fc out1.txt out2.txt 7 if not errorlevel 1 goto loop 8 pause 9 goto loop
数据生成器rand
标程test1
待测程序test2
errorlevel说的是上一句话的错误信息,所以不能和目标语句隔开写,需要注意