title: Batch file not finding itself once temp files cleared
body: <p>I am encountering an error that states that it can not find the running batch file once it cleared the temp files. </p>
  
  <p>This only happened when I compiled this into an exe file. </p>
  
  <p>I think this is caused by the fact that the exe created a temporary batch file in the temp folder. After that, the batch file itself is asked to clear the temp folder, thus clearing its own alter ego. How do I get around this?</p>
  
  <p>P.S. this is my code snippet that is causing the problem:</p>
  
  <pre><code>cls
  del /s /f /q c:\windows\temp\*.*
  rd /s /q c:\windows\temp
  md c:\windows\temp
  del /s /f /q C:\WINDOWS\Prefetch
  del /s /f /q %temp%\*.*
  rd /s /q %temp%
  md %temp%
  rd /s /q c:\windows\tempor~1
  rd /s /q c:\windows\temp
  rd /s /q c:\windows\tmp
  rd /s /q c:\windows\ff*.tmp
  rd /s /q c:\windows\history
  rd /s /q c:\windows\cookies
  rd /s /q c:\windows\recent
  rd /s /q c:\windows\spool\printers
  del c:\WIN386.SWP
  echo.
  echo.
  </code></pre>