here you go, this should work

for file in *jpg
do
ARTIST1=${file#*- }
ARTIST=${ARTIST1%.*}
ALBUM=${file% -*}
NEWDIR=`ls -d "../Music/Flac/$ARTIST/$ALBUM"*`
if [[ -d "$NEWDIR" ]]
then
mv "$file" "$NEWDIR""/cover.jpg"
fi
done


-- 
wilgartw
------------------------------------------------------------------------
wilgartw's Profile: http://forums.slimdevices.com/member.php?userid=19007
View this thread: http://forums.slimdevices.com/showthread.php?t=51628

_______________________________________________
discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to