title: FFprobe command in a var in IF statement
body: <p>I am trying to set up a batch file (currently testing in CMD prompt) to run when there is a change in the directory.  I have a command stored in a variable "test" which tells me what the first audio codec is.  if it isn't aa3 i plan to re encode the audio with ffmpeg.  My first issue is that when i try to run a simple if statement with my var, i get an error.</p>
  
  <pre><code>set test=ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=nokey=1:noprint_wrappers=1 "my movie (2017).mkv"
  </code></pre>
  
  <p>when i run %test% it returns what is expected.</p>
  
  <p>if i run this as:</p>
  
  <pre><code>if %test% == "ac3" echo true
  </code></pre>
  
  <p>i get:</p>
  
  <pre><code>-v was unexpected at this time.
  </code></pre>
  
  <p>my end goal is to have something like this when something is added to the folder (haven't go the when something changes part yet...probably just run this once a day idk):</p>
  
  <pre><code>set test=ffprobe -v error -select_streams a:0 -show_entries stream=codec_name -of default=nokey=1:noprint_wrappers=1 "%f"
  
  set outpath=S:\Blu Ray\New folder\"%f"
  
  for %f in (*.mkv) DO
      if %test% &lt;&gt; "ac3" (
          ffmpeg -i “%f” -vcodec copy -scodec copy -acodec ac3 -b:a 640k “%outpath%";
  del "%f";
  move "%outpath%" "s:\Blu Ray\")
  </code></pre>
  
  <p>any help would be great</p>
  
  <p>BD</p>