Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-01-12T18:05:51.280Z
Answers.LastActivityDate: 2017-01-12T18:05:51.280Z
Answers.UserDisplayName: llogan
Body: <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>
  
Tags: <ffmpeg><mp4><avi>
Title: How to batch covert a folder of mp4 files to avi?
UserDisplayName: d13
ThreadText: # How to batch covert a folder of mp4 files to avi?
  
  (Asked by: username_0 on 2017-01-12)
  
  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?](https://video.stackexchange.com/questions/20399/whats-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?
  
  **Tags:** ffmpeg, mp4, avi
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2017-01-12. Score: 5 | Accepted answer
  
  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.
  
  
  ---
  
  