How to batch covert a folder of mp4 files to avi? I'm trying to batch convert a folder of MP4 files to AVI using this script:


for f in *.mp4; do ffmpeg -i "$f" -q:v 6 "encoded/${f%.*}.avi”; done


(This is based an earlier question that was helpfully answered for me by @Mulvya here: What&#39;s the best way to convert mp4 to avi?)
I'm receiving the error message:


Unable to find a suitable output format for 'encoded/test file.avi”; done
for f in *.mp4; do ffmpeg -i test'
encoded/test file.avi”; done
for f in *.mp4; do ffmpeg -i test: Invalid argument


Can anyone suggest where i may have made a mistake?
Change the ” to a ".

Avoid using TextEdit or other "smart" editors to edit your scripts and shell commands. They will mangle it with fancy quotes and other oddball characters and ruin your commands.