Note: All files get compared with the file identified as %1 (the first parameter). So a key thing to note if you're dragging and dropping as your method, is to note that the file you grab to drag the group of selected files over the batch file is the file that gets inputted as %1. This will now be the file that all the other dragged files get compared to by binary streams.
@echo off title Binary File Compare - Created by AceInfinity set /a args=0 && for %%a in (%*) do ( set /a args+=1 ) if %args% lss 2 call :noArgs if not exist "bin_output" md "bin_output" ( echo.---------------------------------------------------------------- echo. Binary File Comparison Script - Created by AceInfinity echo. Copyright Tech.Reboot.Pro 2012 echo.---------------------------------------------------------------- echo. ) > "bin_outputresults.txt" echo Processing Binary Data... for %%a in (%*) do ( if not %%a==%1 ( fc /b %1 %%a >> "bin_outputresults.txt" ) ) exit :noArgs echo No other input files as arguments could be found... echo Please specify at least 2 input files to be used for comparison echo. && pause exit
Should support the following:
MS-DOS 3.3x and above
Windows 95
Windows 98
Windows ME
Windows NT
Windows 2000
Windows XP
Windows Vista
Windows 7
Enjoy friends