title: Windows Batch File Recursion Through Directories to Process Files?
body: <p>I'm trying to create a batch script that loops recursively trough directories and subdirectories finds all the .rtf files and converts them to .html</p>
  
  <p>I have a program that makes the conversion like this: <code>rtf2html.exe file.rtf file.html</code></p>
  
  <p>This is my script:</p>
  
  <pre><code>@echo off
  call :treeProcess
  goto :eof
  
  :treeProcess
  for %%f in (*.rtf) do (
      start C:\Users\User\Desktop\rtf2html.exe %%f %%f.html
  )
  for /D %%d in (*) do (
      cd %%d
      call :treeProcess
      cd ..
  )
  exit /b
  </code></pre>
  
  <p>It loops trough the directories but doesn't output anything.</p>
  
  <p>I think at the line <code>start C:\Users\User\Desktop\rtf2html.exe %%f %%f.html</code> it needs the paths for the input output files. 
  I want to output the html file where the rtf is.</p>
  
  <p>Any ideas how to do this?</p>