by Mofi » Sat Apr 10, 2010 5:58 am
There is no quick folder compare option. You can use the following batch file. For a description see the comments (rem).
@echo off
rem Run a full binary recursive folder compare with not equal results written into a text file.
uc.com -fb -dmf -r -d F:\Temp\Test1\ F:\Temp\Test2\ -ne -o F:\Temp\Result.txt
rem Check if a binary file is listed in the results file because of a difference.
%systemroot%\system32\find.exe /c "| Binary |" F:\Temp\Result.txt >nul
if errorlevel 1 goto !CheckText
rem Different binary file listed in the results file.
echo "DIFFERENT"
goto !Exit
:!CheckText
rem Check if a text file is listed in the results file because of a difference.
%systemroot%\system32\find.exe /c "| Text |" F:\Temp\Result.txt >nul
if errorlevel 1 goto !CheckEmptyDir
rem Different text file listed in the results file.
echo "DIFFERENT"
goto !Exit
:!CheckEmptyDir
rem Check if an empty subdirectory exists in one folder and not in the other.
%systemroot%\system32\find.exe /c " none " F:\Temp\Result.txt >nul
if errorlevel 1 goto !AllEqual
rem Different empty subdirectories in one or both folders.
echo "DIFFERENT"
goto !Exit
:!AllEqual
echo "SAME"
:!Exit
del F:\Temp\Result.txt >nul