Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

randomize usb-stick audio for players that won't shuffle

Jul
533
10
Tired of bluetooth speakers that won't play the contents of a usb stick in shuffle order? Why not prefix each song with a random 4 digit number?

fix the problem in TCC by randomizing the filesort via prepending a 4-digit random number:

Code:
set filemask_audio=*.mp3;*.wav;*.rm;*.voc;*.au;*.mid;*.stm;*.mod;*.vqf;*.ogg;*.mpc;*.wma;*.mp4;*.flac;*.snd;*.aac;*.opus;*.ac3

    for /a:-d /h %audiofile in (%filemask_audio%) echo *move /r /g /h /E  /Ns "%audiofile" "%@FORMAT[04,%@RANDOM[0,9999]]_%@REREPLACE[[0-9]*[\-_]+ *,,%audiofile]"


looks kinda like this [without the color/formatting]:
1717605847260.png
 
Last edited:
My fancier looking version is on my github (look for batfile starting with "renumber")
1717614959432.png
 
[snipped]

Code:
set filemask_audio=*.mp3;*.wav;*.rm;*.voc;*.au;*.mid;*.stm;*.mod;*.vqf;*.ogg;*.mpc;*.wma;*.mp4;*.flac;*.snd;*.aac;*.opus;*.ac3

    for /a:-d /h %audiofile in (%filemask_audio%) echo mv /Ns "%audiofile" "%@FORMAT[04,%@RANDOM[0,9999]]_%@REREPLACE[[0-9]*[\-_]+ *,,%audiofile]"

While not related to JPSoft products - what is MV please?
 
While not related to JPSoft products - what is MV please?
My bad! THat's just an alias for "move". I like unix stuff to work under non-unix. Let's my brain rest easier.

[To be really technical., mine is an alias that runs to a postprocessor that makes each filename a different color so that i can see the beginnings/ends of long filenames that are wrapped over multiple lines more easily]
 
My bad! THat's just an alias for "move". I like unix stuff to work under non-unix. Let's my brain rest easier.

[To be really technical., mine is an alias that runs to a postprocessor that makes each filename a different color so that i can see the beginnings/ends of long filenames that are wrapped over multiple lines more easily]

Alias mv=move

Maybe post what MV is actually equal to please
 
@Charles G

Most likely it is simply “MV=MOVE” ... (to have the command name like in Unix) ...
 
@AnrDaemon @lizayong

About the post from Claire (@ClioCJS):

As she said: playlists are NOT always a solution! I have a special device here in LAN, which I use also for music files (streaming) and unfortunately it can't handle SUCH playlists. But else it's a very good solution for me personally.

So, the post IS useful!
 

@Alpengreis


OH I FORGOT TO UPDATE THIS THREAD!

I took this camping. Tried it on 3 different bluetooth speakers. Nope nope nope nope nope.

Every single one dang played them in the order they were written to the usb.
(And of course, none have shuffle even though they are all different brands.)

But i noticed that it plays folders sequentially, so i realized the solution:

To simulate random:

Place ONE SONG PER FOLDER in randomly-numbered folders.

I probably won't write this out until camping next year but I have high confidence this is the solution.
 
[And yes, mv=move... When I was learning unix in the early 90s it was important to me to alias the windows versions of commands on unix, and the unix version of commands on windows.]
 
P.S. post updated to expand mv to what it is aliases as , sorry!
 
Back
Top