title: executing all the .reg files from batch file
body: <p>I have following script that executes all the .reg files in the current directory. the problem is i also have sub directories in that folder and i want to execute those reg files as well. I am not sure what switch i am supposed to use. i tries using <code>/s</code> which returns all the .reg files of the drive.</p>
  
  <p>this is how my batch file looks like:</p>
  
  <pre><code>rem @echo off
  cls
  SET folder=%~dp0
  for %%i in ("%folder%*.reg") do (regedit /s "%%i")
  echo done
  pause
  EXIT
  </code></pre>
  
  <p>This is how file/directory structure looks like:</p>
  
  <pre><code>Folder1
     batchfile.bat -&gt; user double clicks or executes from command prompt
     1.reg
     2.reg
     3.reg
     Folder2
        4.reg
        5.reg
  </code></pre>
  
  <p>what am i missing here?</p>