本帖最后由 flyingd 于 2012-6-28 16:08 编辑
- @ECHO OFF
- ECHO N|COMP A.txt B.txt >TEMP.TXT
- FOR /F "tokens=3 delims= " %%i in ('Find /c /i "Files compare OK" TEMP.TXT') do set VAR=%%i
- IF %VAR% EQU 1 (
- ECHO file is same
- ) ELSE (
- ECHO File is different
- copy A.txt B.tXT
- )
- DEL TEMP.TXT
- )
复制代码
|