Code: Select all
@echo off
set d1=C:\Test\1
set d2=C:\Test\2
echo -----
echo :1 2:
echo -----
for /f "delims=" %%i in ('dir /b/a-d "%d1%\*" "%d2%\*"^|sort') do (
call set "$i=%%$i:%%i=%%"
if defined $i (
if not exist "%d1%\%%i" (echo :. +: %%i) else (
if not exist "%d2%\%%i" (echo :+ .: %%i) else (
fc "%d1%\%%i" "%d2%\%%i" >nul&& echo := =: %%i|| echo :^< ^>: %%i)))
set "$i=%%i"
)
Note: Files start with 01_..., 02_..... etcFC: Insufficient number of file specifications