
CODE: [Copy to clipboard]@echo off
set mypath=E:
if not exist "%mypath%\合并" (
md "%mypath%\合并"
)
for /f "tokens=*" %%a in ('dir /s /b /ad "%mypath%"') do (
if "%%a" neq "%mypath%\合并" (
for /f "tokens=*" %%b in ('dir /s /b /a-d "%%a" 2^>nul') do (
if exist "%mypath%\合并\%%~nxb" (
ren "%mypath%\合并\%%~nxb" "%%~nb.old">nul 2>nul
)
move "%%b" "%mypath%\合并">nul 2>nul
)
)
)
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |