SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > Silent Hunter III
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-09-25, 03:20 PM   #1
Mowgli
Sparks
 
Mowgli's Avatar
 
Join Date: Dec 2001
Location: South Wales
Posts: 248
Downloads: 158
Uploads: 0
gear 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.
Mowgli is offline   Reply With Quote
Old 03-11-25, 11:56 AM   #2
Doolar
Expert Shipsinker
 
Doolar's Avatar
 
Join Date: Feb 2007
Location: Baltimore,Md./ CA45
Posts: 913
Downloads: 360
Uploads: 0
Default Thank You

Thanx, much needed, I have about 620 selections and only the first tunes, over and over.
__________________
ONEALEX 1.53 ARB / NYGM "ENHANCED Steel Coffin Edition" v7.8 DGUI / CCom12 DGUI / WAC 5.2 DGUI / Toyotagt86 v2.3 ARB / GWX3 DGUI / GWX Knight's Cross v1
Doolar is offline   Reply With Quote
Old 03-11-25, 03:10 PM   #3
Doolar
Expert Shipsinker
 
Doolar's Avatar
 
Join Date: Feb 2007
Location: Baltimore,Md./ CA45
Posts: 913
Downloads: 360
Uploads: 0
Default Thank you Again

Works perfectly. If ya ever find yourself in CA45 (Baltimore Md), I owe ya a beer
__________________
ONEALEX 1.53 ARB / NYGM "ENHANCED Steel Coffin Edition" v7.8 DGUI / CCom12 DGUI / WAC 5.2 DGUI / Toyotagt86 v2.3 ARB / GWX3 DGUI / GWX Knight's Cross v1
Doolar is offline   Reply With Quote
Old 03-13-25, 09:52 AM   #4
Mowgli
Sparks
 
Mowgli's Avatar
 
Join Date: Dec 2001
Location: South Wales
Posts: 248
Downloads: 158
Uploads: 0
Icon14 Your welcome

Quote:
Originally Posted by Doolar View Post
Works perfectly. If ya ever find yourself in CA45 (Baltimore Md), I owe ya a beer
My pleasure, I also like listening to music and songs on patrol.

__________________
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.
Mowgli is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 09:43 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 1995- 2025 Subsim®
"Subsim" is a registered trademark, all rights reserved.