对比的bat

@echo off
set work_path=D:\SDK_HOME\dist\对比\oos_20150605_dev
D:
cd %work_path%
for /R %%s in (.,*) do (
echo '%%~nxs %%~zs' >>../a.txt
)



set work_path=D:\SDK_HOME\dist\对比\oos_20150717_dev
D:
cd %work_path%
for /R %%s in (.,*) do (
echo '%%~nxs %%~zs' >>../b.txt
)





cd %D:\SDK_HOME\dist\对比%

:echo ---------------------------------------------------重复的文件夹>c.txt
:findstr /g:a.txt b.txt>>c.txt
echo  -----------------------------------------------------A有B没有>>c.txt
findstr /ivg:b.txt a.txt>>c.txt
echo --------------------------------------------------------B有A没有>>c.txt
findstr /ivg:a.txt b.txt>>c.txt


pause



%%~fs || %%~ds || %%~ps || %%~ns% || %~xs || %%~ss || %%~as  || %%~ts || %%~zs

猜你喜欢

转载自alafqq.iteye.com/blog/2232525
bat