GWX KC Edition Gramophone Randomizer
To randomize the ogg files in your gramophone directory.
First backup your tracks to another folder.
Cut and copy the code below into a new notepad file and save any name you like with a .bat extension.
Save in your gramophone folder.
I then created a shortcut on my desktop to to run it from there or you can go into the folder and run it from there also before starting your SH3 session.
I am been running it for some time now and it is fine with 58 ogg files. I shall be adding more. Here is the code, I accept no responsibility if you have a problem.
Please note you will lose original file names and new "names" will be generated each time the bat file is run.
@@echo off
setlocal enabledelayedexpansion
:: Define directory (change if needed)
set "music_dir=%CD%"
:: Change to the directory with the OGG files
cd /d "%music_dir%"
:: Create a temporary file list
set "tmpfile=randomlist.tmp"
dir /b *.ogg > "%tmpfile%"
:: Loop through each file and rename it with an 8-digit random number
for /f "tokens=*" %%A in (%tmpfile%) do (
set /a randnum=!random! * 100000 + !random! %% 100000
ren "%%A" "!randnum!.ogg"
)
:: Clean up temp file
del "%tmpfile%"
echo Files randomized successfully with fixed-length filenames.
pause
__________________
Now this is the Law of the Jungle -- as old and as true as the sky;
And the Wolf that shall keep it may prosper, but the Wolf that shall break it must die.
As the creeper that girdles the tree-trunk the Law runneth forward and back --
For the strength of the Pack is the Wolf, and the strength of the Wolf is the Pack.
|