本帖最后由 pcl_test 于 2015-4-10 18:54 编辑
- @echo off &setlocal enabledelayedexpansion
- for /f "delims=" %%a in ('dir /a-d /b ^|find /v ".bat"') do (
- for /f "tokens=1,2 delims=-." %%b in ("%%~a") do (
- set "b=%%b" & set "c=%%c"
- ren "%%~a" "!c:~1! - !b:~,-1!%%~xa"
- )
- )
- pause
复制代码
|