Batch convert *.avi files using ffmpeg
Your batch file is not in the correct format for a Windows bat script. Instead your script looks like it was intended for Linux. You will need to change the script to use a for loop that is supported by the Windows Shell.
Below is an example of how to accomplish this task by using a windows for loop. Just put the below line in your batch file and move the script to the same directory as the avi files, then run it.
for %%A IN (*.avi) DO ffmpeg -i "%%A" "%%A.mpg"