first at all thank you
cs-cam this was exact that what i needed.
If you want to copy your ID3-Tags to the new file, just add a id3cp to the script (by using the id3-lib)
Code:
#/bin/bash
IFS='
'
FILES=`ls $1`
for file in $FILES
do
echo "$file"
mkdir $1/output &>/dev/null
lame -b 32 -f -m m "$1/$file" "$1/output/$file"
id3cp "$1/$file" "$1/output/$file"
done
echo
echo "FINISHED!"
exit 0
here is my script, it converts all files in a directory to 96kbit-joint-stereo
Code:
#/bin/bash
IFS='
'
FILES=`ls $1`
for file in $FILES
do
echo "$file"
mkdir $1/output &>/dev/null
lame -b 96 -h -m j "$1/$file" "$1/output/$file"
id3cp "$1/$file" "$1/output/$file"
done
mv $1/output/* $1
rm -Rf $1/output
echo
echo "FINISHED!"
exit 0