#!/bin/bash
for i in *;
do
a=$i;
b=`echo $PWD\`$i;
echo $b >> playlist; # the file names are stored in "playlist"
done
this way the names of all the files in all the subdirectories will be stored in "playlist" along with the appropriate path. Then we can play the list
as follows -
$ mpg321 --list playlist -z # -z for shuffle mode
That is it! Enjoy your music! Here we are assuming that all files are stored in various subdirectories of one parent directory, say 'music'. The script has to executed from the directory 'music'.


0 comments:
Post a Comment