windows8批处理更改文件名

来源:互联网 发布:王珂假富豪 知乎 编辑:程序博客网 时间:2024/05/17 06:30
@echo off&setlocal EnableDelayedExpansionset a=1for /f "delims=" %%i in ('dir /b *.ico') do (if not "%%~ni"=="%~n0" (if !a! LSS 10 (ren "%%i" "b0!a!.ico") else ren "%%i" "b!a!.ico"set/a a+=1))

意思是说把.ico后缀文件更名为bxx.ico,xx为数字