@ECHO OFF
IF NOT EXIST ..\CONFIG.BAT (
  ECHO ERROR:  CANNOT FIND CONFIG.BAT FILE. > REMOVE_SIM.LOG
  ECHO CANNOT FIND CONFIG.BAT FILE.
  ECHO THE CURRENT DIRECTORY NEEDS TO BE SET TO THE DIRECTORY THIS BATCH FILE IS IN BEFORE RUNNING THIS BATCH FILE
  PAUSE
  ECHO DONE > DONE_REMOVE_SIM.LOG
) ELSE (
  IF EXIST DONE_REMOVE_SIM_LOG DEL DONE_REMOVE_SIM.LOG
  ..\CONFIG.BAT > ..\CONFIG.SQL
  ECHO ON
  %SQLPLUS_PATH%SQLPLUS.EXE /NOLOG @REMOVE_SIM
  :WAIT1
  IF NOT EXIST DONE_REMOVE_SIM.LOG GOTO WAIT1
  @ECHO OFF
  CALL DELETE.BAT
  DEL DELETE.BAT
  ECHO ---------------------
  ECHO SIM REMOVAL COMPLETE.	
  ECHO ---------------------
  DEL ..\CONFIG.SQL
)
REM NOTHING BEYOND THIS POINT WILL RUN
