本帖最后由 guaiwu 于 2011-8-30 15:03 编辑
- @echo off
- set /a ge=0
- set /a shi=0
- set /a bai=0
- for /f "delims=" %%i in ('dir *.pdf /o:n /b') do (
- setlocal enabledelayedexpansion
- set /a ge+=1
- if not !ge! equ 10 (if !shi! equ 10 (set /a bai+=1,shi=0
- ) else (
- rename "%%i" !bai!!shi!!ge!.pdf
- )
- ) else (
- set /a shi+=1,ge=0
- rename "%%i" !bai!!shi!!ge!.pdf
- )
- )
复制代码 批量修改文件名 001、002、003 |