FOR %%i in (*.mpg) do call :loop %%i goto end :loop if EXIST E:\compress\%1 goto :EOF echo Started %1 pass 1 encode %DATE% %TIME% >> c:\output\log.txt start /belownormal /min /WAIT mencoder.exe %1 -o E:\compress\%1 -info name="%1" -ovc xvid -xvidencopts pass=1 -nosound -vf kerndeint=ac echo Finished pass 1 of 2 pass spedup deinterlace 1000kbps %DATE% %TIME% %1 >> C:\output\log.txt start /belownormal /min /WAIT mencoder.exe %1 -o E:\compress\%1 -info name="%1" -ovc xvid -xvidencopts pass=2:bitrate=1000 -oac mp3lame -lameopts cbr:br=128 -vf kerndeint=ac echo FINISHED 1000kbps 2 pass spedup deinterlace P4 %DATE% %TIME% >> C:\output\log.txt goto :EOF :end echo