Not sure I understand corretly, but are you saying that you have multiple directories separated for each artists or such and you want to covert all of them at one shot ?
Between pushd and popd, you are already in the OGG directory. Replace 'echo $x $y $z' with whatever command(s) you want to run.
Code:
#!/bin/csh
foreach file (`find <top music dir> -name "*ogg" -print`)
set dir=$file:h
pushd $dir
echo "changing dir to $dir.."
set x = $file:t
set y = $file:r:t
set z = $y."mp3"
echo "$x $y $z"
popd
end
Bookmarks