home *** CD-ROM | disk | FTP | other *** search
/ Total Meltdown / dukenukemtotalmeltdown.img / util / gamefn11 / remove.bat < prev    next >
DOS Batch File  |  1996-03-04  |  2KB  |  60 lines

  1. @echo off
  2. if NOT %0==remove goto currentdir
  3. if "%1"=="" goto usage
  4. if "%1"=="-?" goto usage
  5. if "%1"=="/?" goto usage
  6. if NOT "%2"=="" goto tomanyparam
  7.  
  8. if EXIST %1\doom.exe goto dodoom
  9. if EXIST %1\doom2.exe goto dodoom
  10. if EXIST %1\duke3d.exe goto doduke
  11.  
  12. echo Could not find doom.exe, doom2.exe, or duke3d.exe in the specified
  13. echo directory.  GamePhones removal aborted.
  14. goto done
  15.  
  16. :dodoom
  17. if NOT EXIST %1\sersetup.bak goto nodoom
  18. if EXIST %1\sersetup.exe del %1\sersetup.exe
  19. if EXIST %1\sersetup.cfg del %1\sersetup.cfg
  20. if EXIST %1\allmodem.str del %1\allmodem.str
  21. copy %1\sersetup.bak %1\sersetup.exe
  22. del %1\sersetup.bak
  23. echo GamePhones successfully removed from %1!
  24. goto done
  25.  
  26. :nodoom
  27. echo No sersetup.bak file exists in the specified directory.
  28. echo Either GamePhones has not been installed or it has already been removed.
  29. echo GamePhones removal aborted.
  30. goto done
  31.  
  32. :doduke
  33. if NOT EXIST %1\commit3d.exe goto noduke
  34. if EXIST %1\commit.exe del %1\commit.exe
  35. if EXIST %1\commit.set del %1\commit.set
  36. if EXIST %1\allmodem.str del %1\allmodem.str
  37. copy %1\commit3d.exe %1\commit.exe
  38. del %1\commit3d.exe
  39. echo GamePhones successfully removed from %1!
  40. goto done
  41.  
  42. :noduke
  43. echo No commit3d.exe file exists in the specified directory.
  44. echo Either GamePhones has not been installed or it has already been removed.
  45. echo GamePhones removal aborted.
  46. goto done
  47.  
  48. :tomanyparam
  49. echo To many parameters.
  50. goto usage
  51.  
  52. :currentdir
  53. echo You must run remove from inside its own directory.
  54.  
  55. :usage
  56. echo usage: remove thefullpathtothegamedirectory  ex: remove c:\duke3d
  57.  
  58. :done
  59.  
  60.