@echo off setlocal enabledelayedexpansion for %%x in (*) do ( if not "%%x"=="demo.bat" ( set /a sum+=1 rename "%%x" "!sum!.jpg" ) ) pause
bat遍历当前目录下的文件,批量重命名
原文:http://www.cnblogs.com/gaocong/p/5968080.html