title: Batch file and DEL errorlevel 0 issue
body: <p>The batch has to remove files and directories from specific locations and output success or stdout/stderr messages to a new .txt file. I have created the most of the script and it performs exactly as it should, except when the deletion is successful it moves forward to the next line rather than echo a 'successful' message on the log. </p>
  
  <pre><code>echo Basic Deletion Batch Script &gt; results.txt
  @echo off
  call :filelog &gt;&gt; results.txt 2&gt;&amp;1
  notepad results.txt
  exit /b
  
  :filelog
  
  call :delete new.txt
  call :delete newer.txt
  call :delete newest.txt
  call :remove c:\NoSuchDirectory
  
  GOTO :EOF
  
  :delete
  echo deleting %1
  del /f /q c:\Users\newuser\Desktop\%1 
  if errorlevel 0 echo succesful
  
  GOTO :EOF
  
  :remove
  echo deleting directory %1
  rmdir /q /s %1
  
  GOTO :EOF
  </code></pre>
  
  <p>For some reason I can't find the syntax for if del succeeds echo 'successful'. In the above example if I remove the line </p>
  
  <pre><code>if errorlevel 0 echo successful
  </code></pre>
  
  <p>Everything works fine, but no success message. With this line left in it echoes success for every line. </p>