home *** CD-ROM | disk | FTP | other *** search
- @echo off
- if _%1==_ goto usage
- if _%2==_ goto usage
-
- basename "set BASENAME=%1" .C >_difftmp.bat
- call _difftmp
- if not _%BASENAME%==_%1 goto gotit
- basename "set BASENAME=%1" .c >_difftmp.bat
- call _difftmp
- if not _%BASENAME%==_%1 goto gotit
- basename "set BASENAME=%1" .H >_difftmp.bat
- call _difftmp
- if not _%BASENAME%==_%1 goto gotit
- basename "set BASENAME=%1" .h >_difftmp.bat
- call _difftmp
- if not _%BASENAME%==_%1 goto gotit
- basename "set BASENAME=%1" .ASM >_difftmp.bat
- call _difftmp
- if not _%BASENAME%==_%1 goto gotit
- basename "set BASENAME=%1" .asm >_difftmp.bat
- call _difftmp
- if not _%BASENAME%==_%1 goto gotit
- basename "set BASENAME=%1" .INC >_difftmp.bat
- call _difftmp
- if not _%BASENAME%==_%1 goto gotit
- basename "set BASENAME=%1" .inc >_difftmp.bat
- call _difftmp
- if not _%BASENAME%==_%1 goto gotit
- echo DODIFF: don't know how to handle files with the extension of "%1"
- goto exit
-
- :gotit
- echo ========= [ diff -b %3 %4 %5 %1 %2\%1 ] ============ >_difftmp.dif
- diff -b %3 %4 %5 %1 %2\%1 >>_difftmp.dif
- if not errorlevel 1 goto same
- type _difftmp.dif >>%BASENAME%.dif
- echo diff -b %3 %4 %5 %1 %2\%1: -- files are different, see %BASENAME%.dif
- goto exit
-
- :same
- echo diff -b %3 %4 %5 %1 %2\%1: -- files are the same
- goto exit
-
- :usage
- echo usage: DODIFF filename compare_directory [diff options]
- goto exit
-
- :exit
- rm -f _difftmp.bat _difftmp.dif
- set BASENAME=
-