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

  1. @echo off
  2. echo off
  3.  
  4. REM *** UPROT.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. echo ═══════════════════════════════════════════════════════════════════════════════
  19. echo  ░███   ░███  ░████      UltraProtect [2.3]
  20. echo ░█  ░█   ░█   ░█  ░█     "Protect archive against deletion and basic updates"
  21. echo ░█████   ░█   ░████  -NL
  22. echo ░█  ░█   ░█   ░█ ──────────────────────────────────────────────────────────────
  23. echo ░█  ░█  ░███  ░█ (c) 1991-1995, Ad Infinitum Programs, all rights reserved
  24. echo ═══════════════════════════════════════════════════════════════════════════════
  25. echo  
  26.  
  27. if q%1==q goto usage
  28. if not exist %1 goto ext
  29.  
  30. REM no BASIC updates
  31. echo q > u$~nobas.lck
  32.  
  33. REM no DELETE
  34. echo q > u$~nodel.lck
  35.  
  36. uc ai %1 u$~nobas.lck u$~nodel.lck > nul
  37.  
  38. if errorlevel 1 goto errl
  39.  
  40. echo UPROT: %1 has been protected against deletion and basic updates
  41.  
  42. goto end
  43.  
  44. :ext
  45. if not exist %1.UC2 goto noaerror
  46.  
  47. echo q > u$~nobas.lck
  48. echo q > u$~nodel.lck
  49.  
  50. uc ai %1.uc2 u$~nobas.lck u$~nodel.lck > nul
  51.  
  52. if errorlevel 1 goto errl
  53.  
  54. echo UPROT: %1.UC2 has been protected against deletion and basic updates
  55.  
  56. goto end
  57.  
  58. :usage
  59. echo Usage: UPROT arch
  60. goto end
  61.  
  62. :noaerror
  63. echo UPROT ERROR: Cannot find archive
  64. goto end
  65.  
  66. :errl
  67. echo UPROT ERROR: UC2 reported a problem
  68. goto end
  69.  
  70. :end
  71. if exist u$~nobas.lck del u$~nobas.lck > nul
  72. if exist u$~nodel.lck del u$~nodel.lck > nul
  73. echo  
  74.  
  75. rem Restore 4DOS compound character if appropriate.
  76. if q%UUUCR%==qT SETDOS /C~
  77. if q%UUUCR%==qT SET U$CR=
  78.