home *** CD-ROM | disk | FTP | other *** search
- @echo off
- echo off
-
- REM *** UCDIR.BAT ***
-
- rem Speedup if 4DOS is present and make sure the compount character is OK.
- if not "%@eval[2+2]" == "4" goto no4dos
- loadbtm on
- echo check > UUU4SENS
- echo ~ copy UUU4SENS UUUCOMPO > nul
- del UUU4SENS > nul
- if not exist UUUCOMPO goto no4dos
- del UUUCOMPO > nul
- SETDOS /C^
- SET UUUCR=T
- :no4dos
-
- cls
- echo ═══════════════════════════════════════════════════════════════════════════════
- echo ░███ ░███ ░████ UCDIR, Ultra Compress Directory [2.3]
- echo ░█ ░█ ░█ ░█ ░█ 'Compresses a complete directory structure into
- echo ░█████ ░█ ░████ -NL an UC2 archive to save diskspace'
- echo ░█ ░█ ░█ ░█ ──────────────────────────────────────────────────────────────
- echo ░█ ░█ ░███ ░█ (c) 1991-1995, Ad Infinitum Programs, all rights reserved
- echo ═══════════════════════════════════════════════════════════════════════════════
-
- if exist ucdir.bat goto ucderror
-
- if exist ucdirdat.u~k goto ukerror
-
- if not q%1q==qq goto paerror
-
- echo ┌─────────────────────────────────────────────────────────────────────────────┐
- set UC2_WIN=xxxxxxxxxxxxxxx > nul
- if not q%UC2_WIN%==qxxxxxxxxxxxxxxx goto smallenv
- set UC2_WIN=003 009 078 020
- echo │ │
- echo │ │
- echo │ │
- echo │ │
- echo │ │
- echo │ │
- echo │ │
- echo │ │
- echo │ │
- echo │ │
- echo │ │
- echo │ │
- echo └─────────────────────────────────────────────────────────────────────────────┘
- :smallenv
- if exist ucdirtmp.uc2 del ucdirtmp.uc2 > nul
- if exist ucdirdat.uc2 ren ucdirdat.uc2 ucdirtmp.uc2 > nul
- UC A -P -S -I !SYSHID=ON !SOS2EA=ON UCDIRTMP
- echo
- echo └─────────────────────────────────────────────────────────────────────────────┘
- set uc2_win=
-
- if errorlevel 1 goto archerror
-
- ren ucdirtmp.uc2 ucdirdat.u~k > nul
- if not exist ucdirdat.u~k goto renerror
-
- echo UCDIR: Moving files...
- UC ~K .
- if not exist u$~reslt.ok goto kerror
- del u$~reslt.ok > nul
-
- :lastren
- ren ucdirdat.u~k ucdirdat.uc2 > nul
- if not exist ucdirdat.uc2 goto ren2error
- attrib +r ucdirdat.uc2 > nul
-
- echo UCDIR: All files/directories in the current directory and below have been
- echo moved to UCDIRDAT.UC2
-
- goto end
-
- :paerror
- echo UCDIR ERROR: No parameters allowed.
- goto end
-
- :ucderror
- echo UCDIR ERROR: UCDIR.BAT should not exist in the current directory.
- goto end
-
- :ukerror
- echo UCDIR ERROR: The file UCDIRDAT.U~K should be removed to allow UCDIR to work.
- goto end
-
- :archerror
- echo UCDIR ERROR: Something went wrong during the compression of your files.
- echo None of your files has been moved by UCDIR.
- goto end
-
- :renerror
- echo UCDIR ERROR: UCDIR was unable to rename UCDIRDAT.UC2 to UCDIRDAT.U~K
- goto end
-
- :ren2error
- echo UCDIR ERROR: UCDIR was unable to rename UCDIRDAT.U~K to UCDIRDAT.UC2
- echo You MUST correct this !!!
- goto end
-
- :kerror
- echo UCDIR ERROR: Not all files have been moved, some remain uncompressed.
- goto lastren
-
- :end
-
- rem Restore 4DOS compound character if appropriate.
- if q%UUUCR%==qT SETDOS /C~
- if q%UUUCR%==qT SET U$CR=
-