@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
用bat脚本实现两个文件夹的对比,并输出txt(原创)
最新推荐文章于 2024-09-03 09:37:50 发布