#!/bin/bash # Made by ioccatflashdancedotcx # Version 1.0, Sun Dec 31 17:47:42 CET 2006 starts="/temp/mp3" for start in $starts; do echo "Starting at: $start" cd "$start" || break for maindir in mp3*; do cd "$maindir" || continue echo " In $maindir/, processing album:" for albumdir in *; do if [ -d "$albumdir" ]; then echo " $albumdir" (cd "$albumdir" && find . -name '*.mp3' -print0 \ | xargs >/dev/null -0 id3tag --album "$albumdir") fi done cd .. done cd .. done # special cd /var/tmp cd /temp/mp3/mp3 find . -name '*.mp3' -print0 | xargs -0 id3tag --album mp3 cd /temp/mp3/mp3-albums id3tag --album mp3-albums *.mp3 cd /temp/mp3/best_of_iocc_mp3s/eurobeat find . -name '*.mp3' -print0 | xargs -0 id3tag --album best_of_iocc-eurobeat cd /temp/mp3/best_of_iocc_mp3s/eurodance find . -name '*.mp3' -print0 | xargs -0 id3tag --album best_of_iocc-eurodance