How to fill your mp3 or ogg player with random songs
Post date: Jan 6, 2010 5:54:07 AM
I have an iRiver 4GB portable mp3 player, but I use it to play Vorbis ogg files.
I have a lot of tunes and every once and a while I like refreshing the whole bunch.
I wanted something simple that I could just point to my Music directory, then point to my USB connected iRiver and walk away.
I wrote my own little Java app to do it. (License: GPL)
Source is attached. compile it and add it to your class path and you are good to go.
Here is the commandline syntax:
tgutwin@warp4:~$ java ca.bc.webarts.tools.RandomFileSelector
SYNTAX: java ca.bc.webarts.tools.RandomFileSelector [-clear | -testing] [-max] [-type fileExtension] musicDirPath transferToDirPath
You *must* supply the directories on the commandline, other options are optional.
Filetype defaults to ogg
An Optional argument can be specified:
'-testing' to allow no actual writes
'-clear' it will contents of the device dir first
'-fill' will run until the device is full ELSE it loads 250 songs at a time
java ca.bc.webarts.tools.RandomFileSelector -clear /var/media/snd/ogg /mnt/usb-storage/music
java ca.bc.webarts.tools.RandomFileSelector -clear -fill -type mp3 /var/media/snd/ogg /mnt/usb-storage/music
Try it out.