title: .BAT - Launch a .exe with arguments where the .exe location and arguments are strings
body: <p>Trying to use the code below to run the following command in a .bat file</p>
  
  <pre><code>c:\program files (x86)\Team Mediaportal\Mediaportal\TV Thumbnailer\ffmpeg.exe -ss 720 -itsoffset -5 -i "c:\tv recordings\sample recording.mpg" -vframes 1 -y "C:\tv recordings\sample recording.jpg"
  </code></pre>
  
  <hr>
  
  <pre><code>Set "FFMpeg_Location=c:\Program Files (x86)\Team Mediaportal\Mediaportal\TV Thumbnailer"
  
  rem or Set "FFMpeg_Location=c:\Program Files (x86)\Team Mediaportal\Mediaportal\TV Thumbnailer\ffmpeg.exe" , whichever is easier :D
  
  Set "Video_Path=c:\tv recordings\"
  
  Set "Video_File=sample recording"
  
  %FFMpeg_Location%\FFMpeg.exe -ss 720 -itsoffset -5 -i "%Video_Path%%Video_File%.mpg" -vframes 1 -y "%Video_Path%%Video_File%.jpg"
  </code></pre>
  
  <hr>
  
  <p>PS. I'd like the .bat to continue after ffmpeg has finished running, as I am using ffmpeg to process a lot of files inside a for loop.  Also I'd prefer not to change the working directory of the .bat file by doing cd c:\pro...\tv thumbnailer\ as that would break my script.</p>
  
  <hr>
  
  <p><strong>EDIT: I solved my problem by using the call statement :D</strong></p>
  
  <pre><code>call "%FFMpeg_Location%\FFMpeg.exe" -ss 720 -itsoffset -5 -i "%Video_Path%%Video_File%.mpg -vframes 1 -y "%Video_Path%%Video_File%.jpg"
  </code></pre>