大量文件比对,查找缺少的文件.: 查ALAW_DIR_A中文件,在 AMR_DIR下没有的文件,结果记录在no_exist_file.tmp
1.diff_dir.bat
@ECHO OFF
set ALAW_DIR_A=\\xx.xx.xx.xx\e$
set AMR_DIR=\\xx.xx.xx.xxx\e$\amr
dir /b %ALAW_DIR_A%\*lib* >> tmpDIRtmp
for /f %%a in ( tmpDIRtmp ) do call d_list %%a
del /f tmpDIRtmp
pause
2.d_list.bat
@ECHO OFF
IF ""%1"" == """" goto END_A
DIR /b %ALAW_DIR_A%\%1 >> tmpalawtmp
for /f "delims=. tokens=1,2" %%a in ( tmpalawtmp ) do call d_diff %1 %%a
del /f tmpalawtmp
:END_A
3.d_diff.bat
@ECHO OFF
IF ""%1"" == """" goto END_A
IF ""%2"" == """" goto END_A
IF NOT EXIST %AMR_DIR%\%1 GOTO END_B
IF EXIST %AMR_DIR%\%1\%2.amr GOTO END
echo %1,%2 >>no_exist_file.tmp
GOTO END
:END_B
echo %AMR_DIR%\%1 NOT EXIST
GOTO END
:END_A
echo "参数不全"
:END