home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / u / uupc11v3.zip / UUCLEAN.CMD < prev    next >
OS/2 REXX Batch file  |  1992-08-30  |  3KB  |  65 lines

  1. echo off
  2. REM *------------------------------------------------------------------*
  3. REM *    Written and contributed by Michael Morrett                    *
  4. REM *    (ICBJ100@INDYVAX.IUPUI.EDU).  Support for by Snuffles P.      *
  5. REM *    Bear (Snuffles@kew.com).  Comments by Drew Derbyshire         *
  6. REM *    (help@kew.com); delete the comments to make this run faster.  *
  7. REM *------------------------------------------------------------------*
  8. REM *   Define your spool and temp directories on following line       *
  9. REM *------------------------------------------------------------------*
  10. if "%1" == "" %0 \uupc\spool %temp%
  11. if "%2" == "" %0 %1 %temp%
  12. REM *------------------------------------------------------------------*
  13. REM *        Handle recursive call to process one directory            *
  14. REM *------------------------------------------------------------------*
  15. if "%1" == "cleanit" goto cleanit:
  16. echo Cleaning UUPC/extended directories %1 and %2
  17. REM *------------------------------------------------------------------*
  18. REM *     Temporary files created by UUCICO in spool directory         *
  19. REM *------------------------------------------------------------------*
  20. if exist %1\*.$$$ erase %1\*.$$$
  21. REM *------------------------------------------------------------------*
  22. REM * Temporary files created by MAIL and RMAIL.  (and their           *
  23. REM * backups created by many editors)                                 *
  24. REM *------------------------------------------------------------------*
  25. if exist %2\UUPC*.tmp erase %2\UUPC*.tmp
  26. if exist %2\UUPC*.txt erase %2\UUPC*.txt
  27. if exist %2\UUPC*.bak erase %2\UUPC*.bak
  28. REM *------------------------------------------------------------------*
  29. REM *                 Clean the various log files                      *
  30. REM *------------------------------------------------------------------*
  31. call %0 cleanit %1\linedata
  32. call %0 cleanit %1\rmail
  33. call %0 cleanit %1\rnews
  34. call %0 cleanit %1\uuxqt
  35. call %0 cleanit %1\uucico
  36. call %0 cleanit %1\expire
  37. if exist %1\syslog     rename %1\syslog syslog.log
  38. call %0 cleanit %1\syslog
  39. REM *------------------------------------------------------------------*
  40. REM *                      Clean up old news                           *
  41. REM *------------------------------------------------------------------*
  42. expire
  43. REM *------------------------------------------------------------------*
  44. REM *         Purge any files we killed from the undelete bucket.      *
  45. REM *         This applies to OS/2 2.0 only.                           *
  46. REM *------------------------------------------------------------------*
  47. undelete %1 /a /s /f
  48. undelete %2 /a /s /f
  49. goto exit
  50. REM *------------------------------------------------------------------*
  51. REM *                  Clean up a single log file                      *
  52. REM *------------------------------------------------------------------*
  53. :cleanit
  54. if not exist %2.log goto :exit
  55. echo Cleaning %2.log files.
  56. if exist %2.004    del %2.004
  57. if exist %2.003 rename %2.003 *.004
  58. if exist %2.002 rename %2.002 *.003
  59. if exist %2.001 rename %2.001 *.002
  60. if exist %2.log rename %2.log *.001
  61. REM *------------------------------------------------------------------*
  62. REM *                        All done, exit                            *
  63. REM *------------------------------------------------------------------*
  64. :exit
  65.