home *** CD-ROM | disk | FTP | other *** search
/ CD-X 3 / cdx_03.iso / shutils / dos / uc2b305.arj / UCDIR.BAT < prev    next >
Encoding:
DOS Batch File  |  1995-09-16  |  3.9 KB  |  113 lines

  1. @echo off
  2. echo off
  3.  
  4. REM *** UCDIR.BAT ***
  5.  
  6. rem Speedup if 4DOS is present and make sure the compount character is OK.
  7. if not "%@eval[2+2]" == "4" goto no4dos
  8.     loadbtm on
  9.     echo check > UUU4SENS
  10.     echo   ~ copy UUU4SENS UUUCOMPO > nul
  11.     del UUU4SENS > nul
  12.     if not exist UUUCOMPO goto no4dos
  13.     del UUUCOMPO > nul
  14.     SETDOS /C^
  15.     SET UUUCR=T
  16. :no4dos
  17.  
  18. cls
  19. echo ═══════════════════════════════════════════════════════════════════════════════
  20. echo  ░███   ░███  ░████      UCDIR, Ultra Compress Directory [2.3]
  21. echo ░█  ░█   ░█   ░█  ░█     'Compresses a complete directory structure into
  22. echo ░█████   ░█   ░████  -NL  an UC2 archive to save diskspace'
  23. echo ░█  ░█   ░█   ░█ ──────────────────────────────────────────────────────────────
  24. echo ░█  ░█  ░███  ░█ (c) 1991-1995, Ad Infinitum Programs, all rights reserved
  25. echo ═══════════════════════════════════════════════════════════════════════════════
  26.  
  27. if exist ucdir.bat goto ucderror
  28.  
  29. if exist ucdirdat.u~k goto ukerror
  30.  
  31. if not q%1q==qq goto paerror
  32.  
  33. echo ┌─────────────────────────────────────────────────────────────────────────────┐
  34. set UC2_WIN=xxxxxxxxxxxxxxx > nul
  35. if not q%UC2_WIN%==qxxxxxxxxxxxxxxx goto smallenv
  36. set UC2_WIN=003 009 078 020
  37. echo │                                                                             │
  38. echo │                                                                             │
  39. echo │                                                                             │
  40. echo │                                                                             │
  41. echo │                                                                             │
  42. echo │                                                                             │
  43. echo │                                                                             │
  44. echo │                                                                             │
  45. echo │                                                                             │
  46. echo │                                                                             │
  47. echo │                                                                             │
  48. echo │                                                                             │
  49. echo └─────────────────────────────────────────────────────────────────────────────┘
  50. :smallenv
  51. if exist ucdirtmp.uc2 del ucdirtmp.uc2 > nul
  52. if exist ucdirdat.uc2 ren ucdirdat.uc2 ucdirtmp.uc2 > nul
  53. UC A -P -S -I !SYSHID=ON !SOS2EA=ON UCDIRTMP
  54. echo  
  55. echo └─────────────────────────────────────────────────────────────────────────────┘
  56. set uc2_win=
  57.  
  58. if errorlevel 1 goto archerror
  59.  
  60. ren ucdirtmp.uc2 ucdirdat.u~k > nul
  61. if not exist ucdirdat.u~k goto renerror
  62.  
  63. echo UCDIR: Moving files...
  64. UC ~K .
  65. if not exist u$~reslt.ok goto kerror
  66. del u$~reslt.ok > nul
  67.  
  68. :lastren
  69. ren ucdirdat.u~k ucdirdat.uc2 > nul
  70. if not exist ucdirdat.uc2 goto ren2error
  71. attrib +r ucdirdat.uc2 > nul
  72.  
  73. echo UCDIR: All files/directories in the current directory and below have been
  74. echo        moved to UCDIRDAT.UC2
  75.  
  76. goto end
  77.  
  78. :paerror
  79. echo UCDIR ERROR: No parameters allowed.
  80. goto end
  81.  
  82. :ucderror
  83. echo UCDIR ERROR: UCDIR.BAT should not exist in the current directory.
  84. goto end
  85.  
  86. :ukerror
  87. echo UCDIR ERROR: The file UCDIRDAT.U~K should be removed to allow UCDIR to work.
  88. goto end
  89.  
  90. :archerror
  91. echo UCDIR ERROR: Something went wrong during the compression of your files.
  92. echo              None of your files has been moved by UCDIR.
  93. goto end
  94.  
  95. :renerror
  96. echo UCDIR ERROR: UCDIR was unable to rename UCDIRDAT.UC2 to UCDIRDAT.U~K
  97. goto end
  98.  
  99. :ren2error
  100. echo UCDIR ERROR: UCDIR was unable to rename UCDIRDAT.U~K to UCDIRDAT.UC2
  101. echo              You MUST correct this !!!
  102. goto end
  103.  
  104. :kerror
  105. echo UCDIR ERROR: Not all files have been moved, some remain uncompressed.
  106. goto lastren
  107.  
  108. :end
  109.  
  110. rem Restore 4DOS compound character if appropriate.
  111. if q%UUUCR%==qT SETDOS /C~
  112. if q%UUUCR%==qT SET U$CR=
  113.