View Single Post
  #5 (permalink)  
Old May 18th, 2003
TwinGears TwinGears is offline
Novicius
 
Join Date: April 12th, 2003
Posts: 4
TwinGears is flying high
Lightbulb following up....

#!/bin/bash
#The idea here is to copy .ogg files to full paths like artist_album_song.ogg
#this was done quickly so if anyone has some know how to make this really slick then please drop me a line - hope everyone likes it, enjoy.

#find path and trim it to necessary artist information at hand
artist(){
path=$(pwd)
set foo | echo ${path##*ogg/}|sed -e"s:/:-:g"
}

#add full artist & album name to songs
for i in *.ogg
do mv $i $(artist)-$i
done

#move songs to the sharing directory - remove this if you don't share...
echo moving songs to mutella sharing directory
mv *.ogg /home/$USER/mutella
echo moving completed
Reply With Quote