CODE: [Copy to clipboard]@echo off setlocal EnableDelayedExpansion for /f %%i in ('dir /b /os "要操作的文件夹" ^|find ".mp3"') do ( set /a num+=1 ren %%i !num!%%i ) explorer "要操作的文件夹"