title: if else condition inside of forfiles loop
body: <p>I've inherited a batch file, and in it, I've got the following command -</p>
  
  <pre><code>forfiles /s /c "cmd /c IF @ISDIR==TRUE rmdir @FILE /q" &gt;&gt; C:\Apps\%dt%\%dt%.log  2&gt;&amp;1
  </code></pre>
  
  <p>In the log, I get the following error: </p>
  
  <blockquote>
    <p>ERROR: The system cannot find the file specified.</p>
  </blockquote>
  
  <p>How can I put an else condition so that it outputs the name of the file not found, instead the Error Message? </p>