I have a set of directories that have files in them for use with LiquidSoap for use with IceCast2
Currently, every time I remove a file or add a file, I have to edit the txt file listing the mp3s to play manually
What I would like to do is create a script, or a cron job, t automatically create a simple list of the fill path to the mp3s across the folders that is completely regenerated each time.
I say it needs to be regenerated for sake of deleted files being removed from the file
The files are in directories suck as
/home/user1/files/foo 1/ /home/user1/files/foo 2/ etc... and the contents are
this file is called this.mp3 another name for a file.mp3 etc... I would like to have a script or cron that creates a txt file with the contents of each folder that ends up like
/home/user1/files/foo 1/this file is called this.mp3 /home/user1/files/foo 1/another name for a file.mp3 /home/user1/files/foo 1/this is a cool filename.mp3 /home/user1/files/foo 2/moar files.mp3 /home/user1/files/foo 2/okay this is getting old.mp3 But if I removed /home/user1/files/foo 1/this file is called this.mp3 then it would leave the txt file on the next generation, and if I added yet another file.mp3 to one of the folders, it would be added to the txt file
Currently running Ubuntu Server 13.04, and am able to install packages, if needed, although wold like to use simple scripts/crons
incrontoo; it responds to changes in directories, so it would be a good fit for this task, instead of a time based cron.