You are not logged in.
looking for a little help here..
am transcoding mp3 to oggs in multiple directories, this is easy enough manually but need to add it to a script.I have it finding all files and changing them but it leaves them, in the parent directory.Any ideas on how to insert them back into the original folders?
whatt i am doing so far is this..
find Songs -name '*.mp3' -exec mp32ogg *.mp3 {} ;
then a simular line to remove them...
find Songs -name '*.mp3' -exec rm {} ;
I need this to be automated so that there is no user interaction
Offline
If it's a simple directory tree like this:
Songs-|-dir1
|-dir2
|-dir3
|-dir4
I would do something like this:
for dir in $(ls);do
cd $dir
mp32ogg *.mp3
rm *.mp3
cd ..
done
I'm still learning bash so the above code might not work. I'm not sure about the $(ls) stuff. The idea is to cd into each directory, convert the ogg file then cd back in parent directory.
Offline
Thanks snowman, have tried that, turn out the answer was under my nose mp32og was written with this task in mind... DOH
mp32ogg --delete 'dirname' 'dirname'
sometimes we make work for ourselves...
Offline