@echo off&setlocal EnableDelayedExpansion
set a=1
for /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为数字
本文介绍了一个使用批处理脚本实现的ICO文件批量重命名方法。通过简单的脚本设置,可以将当前目录下所有的.ico文件按顺序重命名为b01.ico、b02.ico等格式。这一方法适用于需要统一图标文件名称的场景。
@echo off&setlocal EnableDelayedExpansion
set a=1
for /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
)
)
8835

被折叠的 条评论
为什么被折叠?