Solved I want to save files on a flash drive in 'random' order.

Mag innovision / 780
May 12, 2014 at 18:25:16
Specs: Windows 7 ultimate, 256
I just bought a little portable stereo that I can put an SD card or flash drive into and it will play the songs on the drive. I have several thousand Mp3's on my computer and I want to be able to put them on the drive or card and play them. The stereo has nothing but, play, FF, rev, and skip forward or back functionality. All of my files, of course, have titles, lengths and dates. Some have artists, some album name, and some genre. The problem I have is that I can only save them to the drive in alphabetical order (and maybe by length, date, album ect) I want to save them 'randomly' or in a shuffled list. This way I do not have to listen in alphabetical order or to all one artist then all of the next, ect. Is there a program which will shuffle already saved filed on a drive or at the least save them 'randomly' without having to rename 3000 files one way or the other and allow me to have a random playlist going?
When I place the drive in the machine, the songs will be played in the order in which they were saved on the drive. This would be determined by the settings on Windows 7 (in this case). I do not want them saved on the drive in alphabetical order or order of artist or order of genre but in a mixed up order. I know Windows will make them into a list based on the setting. Is there a way, like a 3rd party program, that will control the order of the 'list' in a more random way, without having to go through and put a number or letter or something like that on each file, so that when the machine plays the 'list' it will not be in alphabetical order or order of artist or order of genre or one of the predetermined Windows 7 settings because it was saved on the drive that way.
Another user gave me the idea of something like a batch file that will add random numbers to the files after they are on the flash drive. It would first have to count the number of files present.
Any help would be appreciated!!!

See More: I want to save files on a flash drive in random order.

Report •

May 12, 2014 at 20:19:21
✔ Best Answer
Yeh, this has been done a thousand times here, but it's faster and more fun to "re-code" than to try to search out all the other answers. Also, there are about a hundred ways to work it, but this is my Monday-Night solution:
:==== begin RICK.BAT
@echo off>rick1.bat & setlocal
:: ok M2, dodging the "externals"?
for /f %%a in ('dir') do (
set count=!z!
set z=%%a
for /f "tokens=*" %%a in ('dir /b *.mp3') do call :rand "%%a"
echo rick1.bat will finish the copy...
goto :eof

set /a name=!random! %% count
:: or you could use: IF EXIST F:\!name!.mp3, but I thought this might be faster.
if defined !name! goto :loop
set !name!=1
echo copy %1 f:\!name!.mp3>>rick1.bat
::===== end batch

message edited by nbrane

Report •

May 13, 2014 at 04:57:25
"this is my Monday-Night solution:"


There must be a way to do this with no externals. Beats me what it is.

::====== script starts here ===============
:: copy mp3s in random order
:: randplay.bat 2014-05-13 17:36:52.80
@echo off > %TMP%\NEWFILE & setLocal enableDELAYedeXpansioN

:: you pushd to where your tunes are
pushd c:\temp

for /f "tokens=* delims= " %%a in ('dir/b *.mp3') do (
echo.!RANDOM! %%a

for /f "tokens=1* delims= " %%i in ('sort ^< %TMP%\NEWFILE') do (
echo copy "%%j" somewhere
goto :eof
::====== script ends here =================

M2 Golden-Triangle

Report •

May 13, 2014 at 20:38:19
That was it!!!! Thanks guys! Gotta love the community!

Report •

Related Solutions

Ask Question