!BAT
if "%~1"=="" exit
setlocal
debug off
set num=0
if "%~2"=="" && ls %~1 | call :get_file_max num=
if "%~2"=="" || set num=%~2
if "%~3"=="" || set /a num=%~3-%~2+1
set /a res=%@random% % %num%
if "%~3"=="" || set /a res=%res%+%~2
echo Now Loading %~1%res%
endlocal && gfxmenu %~1%res%
exit