@echo off
setlocal ENABLEDELAYEDEXPANSIONset path=%~dp0set filename=!path!mp3.tmpif "%1" equ "" (echo ERROR_NO_PARAMETERgoto finished)set rand_switch=0
if "%2" equ "rand-on" (set rand_switch=1)pushd %1 0>NUL 1>NUL 2>NUL
if ERRORLEVEL 1 (echo can't find %1 foldergoto finished)dir /b /s *.mp3>!filename!set cnt=10:goif !cnt! lss 100 (if !rand_switch! equ 1 (if exist !path!rearrange_file.exe (!path!rearrange_file.exe !filename!))for /f "delims=" %%i in (!filename!) do (copy %%i !path!\!cnt!.mp3 set /a cnt=!cnt!+1if !cnt! geq 100 goto finished)goto go):finishedif exist !filename! del !filename!popdpause