- @echo off & setlocal enabledelayedexpansion
- set "p=%~p0"
- set n=1000
- set wmic=wmic DataFile where "Drive='%~d0' and Path='%p:\=\\%' and Extension='mp3'"
- for /f "tokens=1*" %%a in ('%wmic% get CreationDate^,Name^|find "\"^|sort') do (
- set /a n+=1
- for /f "delims=" %%c in ("%%b") do ren "%%~fc" "!n:~1!-%%~nxc"
- )
- pause
复制代码
|