title: Ignore error messages when running a batch file but not in the typical way
body: <p>I know that there are ways to say<br>
       IF ERRORMESSAGE GOTO 
  but I've always seen these as simply telling the computer to move past a command that didn't work and go to the next one.</p>
  
  <p>I have a batch file that will run about 30 files in a folder (simulations) to dump data into databases using sqlcmd. A lot of these files are older and might have compatibility issues. Usually I've got it running so that I can see it when an error message pops up and I can close it out so it can keep chugging on. However, it would be nice if I could have it running overnight and be finished by the morning whithout getting snagged on the error messages. I'll see the errors in the missing data so it doesn't matter.</p>
  
  <p>Here's what the code looks like:</p>
  
  <pre><code>RMDIR c:\batchfolder /s /q
  mkdir c:\batchfolder
  xcopy "\\path\*" c:\batchfolder /s /i
  cd c:\path\testfolder
  for /f "tokens=*" %%a in ('dir /b /od') do set newest=%%a
  cd c:\batchfolder
  sqlcmd -S server -i "\\path\DropDatabases.sql"
  for /D /r %%F IN ("*") DO ( 
     for %%G  IN ("%%F\*.extension") DO xcopy "%%G" c:\path\testfolder\%newest% /y /i
     for /f "delims=_" %%J IN ('forfiles /p "%%F" /m *.programext /c "cmd /c echo @path"')  DO start "PROGRAM"  /D "c:\path\testfolder" /Wait PROGRAM -r  %%J
  )
  sqlcmd -S MSA-SQL -i "\\path\dumpdataquery.sql"
  
  pause    
  </code></pre>