title: CMD FFMpeg Converting from one directory to another
body: <p>I have the folder which has the ffmpeg.exe. In this folder I have 2 folders: MP4 and MP3. In the folder called MP4, I have a bunch of video I want just the audio from. I want to convert all of them to mp3 and stick them in the MP3 folder. I have the code to convert but don't know how to deal with the directories. I can move all of the mp4's to the root with the exe and then all of them will convert to mp3 right there, but I want to organize them in their directories. How can I edit my code to work with the directories in the root folder?</p>
  
  <pre><code>FOR /F "tokens=*" %G IN ('dir /b *.mp4') DO ffmpeg -i "%G" -acodec mp3 "%~nG.mp3"
  </code></pre>
  
  <p>Edit: tried lit's code:</p>
  
  <pre><code>FOR /F "tokens=*" %G IN ('dir /b "mp4\*.mp4"') DO ffmpeg -i "%~G" -acodec mp3 "mp3\%~nG.mp3"
  </code></pre>
  
  <p>and tried a couple different edits and kept getting the result "No such file or directory"</p>
  
  <p><a href="https://i.stack.imgur.com/QGMCo.png" rel="nofollow noreferrer">View cmd output image here</a></p>