title: Batch File to execute all .exe in a folder
body: <p>I need to create a batch script that will run all .exe files in a folder. This must include subfolders.</p>
  
  <p>I am running windows 7, and the batch file is stored in the root folder</p>
  
  <p>I have tried several variations with no success. The two main variations are as follows</p>
  
  <pre><code>REM dir *.exe /S /B &gt; tmpFile
  REM set /p listVar= &lt; tmpFile
  REM del tmpFile
  
  FOR %%F IN (%listVar%) DO %%F
  </code></pre>
  
  <p>=======================================</p>
  
  <pre><code>FOR /F "usebackq" %%F IN ('dir *.exe /S /B') DO %%F
  </code></pre>
  
  <p>I have looked through several variations on the above methods but none work. The top version (which I would like to avoid) only reads in one line from the file. The Bottom version outputs an unmodified "dir" command in the prompt window.</p>
  
  <p>Ultimately I would like help identifying how to solve this issue without the need for a temp file.</p>