
CODE: [Copy to clipboard][ Last edited by Hanyeguxing on 2010-6-20 at 17:59 ]@echo off&setlocal enabledelayedexpansion
set "hanye=D:\rec"
for /F "delims=" %%a in ('dir /s/b/a-d "%hanye%\*.*"') do if /i not "%%~dpa"=="%hanye%\" (
set "guxing=%%~dpa"
for %%b in ("!guxing:~0,-1!") do move "%%a" "%hanye%\%%~nb-%%~nxa"
)
| Quote: | |
|
| Quote: | |
|
CODE: [Copy to clipboard][ Last edited by Hanyeguxing on 2010-6-20 at 18:56 ]@echo off&setlocal enabledelayedexpansion
set "han=D:\rec"
for /F "delims=" %%a in ('dir /s/b/a-d "%han%\*.*"') do if /i not "%%~dpa"=="%han%\" (
set "ye=%%~dpa"&set "ye=!ye:%han%\=!"&set "ye=!ye:\=-!"
move "%%a" "%han%\!ye!%%~nxa"
)
| Quote: | |
|
| 欢迎光临 中国DOS联盟论坛 (http://cndos.fam.cx/forum/) | Powered by Discuz! 2.5 |