SET dir=c:\omg SET ext=. FOR /r %dir% %%* IN (%ext%) DO (mp3gain \a dir /B "%%*")