- @echo off
- cd /d "D:\新建文件夹\A\"
- for /f "delims=" %%a in ('dir /b /a-d ') do set _"%%a"=true
-
- cd /d "D:\新建文件夹\B\"
- for /f "delims=" %%i in ('dir /b /a-d ') do (if defined _"%%~nxi" ren "%%i" "%%~ni(2)%%~xi")
- for /f "delims=" %%i in ('dir /b /a-d ') do (move /y "%%i" "D:\新建文件夹\A\")
- pause
复制代码 大概是这样,自己改改 |