home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0020 - 0029 / ibm0020-0029 / ibm0028.tar / ibm0028 / SBTAR1.ZIP / DELTEMP.BAT < prev    next >
Encoding:
DOS Batch File  |  1990-06-04  |  2.3 KB  |  82 lines

  1. ECHO OFF
  2. CLS
  3. IF %1. == ?. GOTO NOBELL
  4. IF %1. == . GOTO CONTINUE
  5. IF EXIST %1\*.* GOTO CONTINUE
  6. GOTO err
  7. :CONTINUE
  8. CLS
  9. ECHO  ═ DO NOT RUN THIS ROUTINE IF ANYONE ELSE IS USING THE SBT SYSTEM ═
  10. ECHO  ═ YOU COULD DELETE TEMPORARY FILES THEY ARE USING AT THIS MOMENT ═
  11. ECHO
  12. :NOBELL
  13. ECHO   * This procedure will delete temporary index and data files which 
  14. IF %1. == . GOTO currmsg
  15. ECHO     were created in %1\ by SBT programs.
  16. GOTO skip
  17. :CURRMSG
  18. ECHO     were created in the current directory by SBT programs.
  19. :SKIP
  20. ECHO .
  21. ECHO   * These files have names starting with a zero, with extensions of 
  22. ECHO     DBF and/or NDX.
  23. ECHO .
  24. ECHO   * These files are normally deleted automatically by the SBT programs
  25. ECHO     which create them, but will not be deleted if you have a power
  26. ECHO     failure or computer freeze-up problem.
  27. ECHO .
  28. ECHO   * If you have experienced any equipment or system problems recently
  29. ECHO     you might want to keep these files until the system manager is sure
  30. ECHO     that the data in these temporary files is of no use in reconstructing
  31. ECHO     lost information.
  32. IF %1. == ?. GOTO DOC
  33. ECHO .
  34. ECHO .
  35. ECHO .
  36. ECHO NOTE:
  37. ECHO If you do not want to delete these files, type ^C (Hold down the 'CTRL'
  38. ECHO key and press the letter C).  Answer 'Y' to terminate.  Otherwise
  39. PAUSE
  40. CLS
  41. ECHO .
  42. ECHO .
  43. ECHO .
  44. IF %1. == . GOTO CURRENT
  45. IF EXIST %1\*.* GOTO ok
  46. :OK
  47. ECHO  
  48. ECHO    *****  Deleting any SBT temporary files in %1\   *****
  49. IF EXIST %1\0*.dbf del %1\0*.dbf
  50. IF EXIST %1\0*.ndx del %1\0*.ndx
  51. ECHO .
  52. ECHO .
  53. ECHO .
  54. ECHO .
  55. ECHO    *****  Temporary files deleted from  %1\  *****
  56. GOTO END
  57. :CURRENT
  58. ECHO    *****  Deleting any SBT temporary files in current directory  *****
  59. IF EXIST 0*.DBF DEL 0*.DBF
  60. IF EXIST 0*.NDX DEL 0*.NDX
  61. ECHO .
  62. ECHO .
  63. ECHO .
  64. ECHO .
  65. ECHO    *****   Any temporary files deleted from current directory *****
  66. GOTO END
  67. :ERR
  68. ECHO   
  69. ECHO  You have entered an nonexistant or empty directory...   
  70. ECHO . 
  71. :DOC
  72. ECHO .
  73. ECHO  The correct format for is: DELTEMP {Path}
  74. ECHO .
  75. ECHO                    e.g. DELTEMP C:\SBT\DATA  (No backslash at end)
  76. ECHO . 
  77. ECHO  If you omit the path, DELTEMP will default to the current directory.
  78. IF %1. == ?. GOTO END
  79. ECHO . 
  80. ECHO  To get help, enter DELTEMP ?
  81. :END
  82.