I want to be able to play a shuffle list of music from an SD card rather than an alphabetical list of albums, played in sequence. Has anyone ever written a batch file that will add random numbers to the files after they are on the SD card? Has anyone ever produced a script to do this?
Share
::====== script starts here ===============
::
:: shuf.bat 2015-02-11 10:45:51.01
@echo off & setLocal enableDELAYedeXpansioN
pushd “Y:\cartalk-collection\CarTalk\CarTalk #1401-1426”
@echo off > SHUFFLE.M3U
@echo off > NEWFILE
:main
for /f “tokens=* delims= ” %%a in (‘dir/b *.mp3’) do (
echo.!RANDOM! %%a
) >> NEWFILE
sort < NEWFILE > #
:sub1
for /f “tokens=1* delims= ” %%i in (#) do (
echo.%%j
) >> SHUFFLE.M3U
del NEWFILE & del #
goto :eof
::====== script ends here =================
=====================
M2 Golden-Triangle