我有400个文本文件,所有文本文件只有数字值。
folder1 \ car1.txt,car2.txt和upto car400.txt
folder2 \ car1.txt,car2.txt .... car400.txt
我想将所有这些文件(如folder1 \ car1.txt)与folder2 \ car1.txt和folder1 \ 400.txt与folder2 \ 400.txt进行比较,如果它们不匹配,我希望批处理将这些文件名写入mismatch.txt
请帮忙。
答案 0 :(得分:0)
@echo off
>mismatch.txt (
for %%F in (folder1\*.txt) do >nul 2>&1 fc "%%F" "folder2\%%~nxF"||echo %%~nxF
)