- @echo off
- set info=互助互利,支付宝扫码头像,感谢打赏
- rem 有问题,可加QQ956535081及时沟通
- title %info%
- set "folder1=D:\xxx\a"
- set "folder2=D:\yyy\b"
- for /f "delims=" %%a in ('dir /a-d/b "%folder2%\"') do (
- for /f "delims=" %%b in ('dir /a-d/b/s "%folder1%\%%~na.*" 2^>nul') do (
- if exist "%folder2%\%%~nxa" (
- set "fd=%%~dpb"
- set "file=%folder2%\%%~nxa"
- setlocal enabledelayedexpansion
- set "fd=!fd:%folder1%=%folder2%!"
- if not exist "!fd!" md "!fd!"
- echo;"!file!" --^> "!fd!"
- move "!file!" "!fd!"
- endlocal
- )
- )
- )
- :end
- echo;%info%
- pause
- exit
复制代码
|