回复 13# go3up
楼主所谓自动递归 是指遍历子目录吧- @echo off&setlocal enabledelayedexpansion
- set ph=c:\text\
- pushd "%ph%"
- for /f "delims=" %%i in ('dir /b /s /ad "*(*)*.*" "*[*]*.*"') do (
- set "str=%%~nxi"
- set "str=!str:*(=!"
- for /f "delims=)]" %%j in ("!str:*[=!") do ren "%%i\*.*" "%%j.*"
- )
- popd
- pause
复制代码
|