For loops in file operations

Examples demonstrating the use of FOR loops in converting .wav file to mp3 using LAME

Linux:

for f in *.wav; do lame "$f" "${f%.wav}.mp3"; done

Windows:

FOR %%i IN (*.wav) DO bin\lame.exe -b 32 --resample 22.05 -m m -h %1 "sounds/%~n1.mp3" "%%i"

About this entry