user17213: 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'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?

user1760: 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.

17213: <p>I'm trying to batch convert a folder of MP4 files to AVI using this script:</p>

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

<p>(This is based an earlier question that was helpfully answered for me by @Mulvya here: <a href="https://video.stackexchange.com/questions/20399/whats-the-best-way-to-convert-mp4-to-avi">What&#39;s the best way to convert mp4 to avi?</a>)
I'm receiving the error message:</p>

<p><code>
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
</code></p>

<p>Can anyone suggest where i may have made a mistake?</p>
 1760: <p>Change the <code>”</code> to a <code>"</code>.</p>

<p>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.</p>
