home *** CD-ROM | disk | FTP | other *** search
/ Der Mediaplex Sampler - Die 6 von Plex / 6_v_plex.zip / 6_v_plex / DISK5 / DOS_01 / 4DVC31.ZIP / 4DVCDLET.BTM < prev    next >
Text File  |  1991-01-04  |  4KB  |  124 lines

  1. @echo off
  2. rem
  3. rem This is the entry .BTM file for killing files to an archive. It accepts 1 to
  4. rem n parameters from the 4DVC.BTM entry screen, each of which should be a
  5. rem filename (wildcards accepted).
  6. rem
  7. rem Variables are "cleaned-up" when they are no longer needed. This helps to
  8. rem keep the Environment Space in use to a minimum.
  9. rem
  10. rem Processing goes like this:
  11. rem
  12. rem Establish an empty subdirectory within which to work
  13. rem For each parameter passed,
  14. rem    If the parameter is an extension only
  15. rem       Find all files in each 4DVC archive
  16. rem    If the parameter is a filename.extension
  17. rem       Find only desired files in each 4DVC archive
  18. rem    Acquire their Descriptions
  19. rem    If no files found, show "no files" message and process next parameter
  20. rem    Present list in the SELECT
  21. rem    Call 4DVCDLT2.BAT for each file the user selects
  22. rem Erase the work-subdirectory
  23. rem
  24.    set VCSPEC=
  25.    set VCRESP=
  26.    set VCFMT=
  27.    set VCOK=
  28.    cls
  29.    md 4DVCDLET >&! NUL
  30.    @del /qy 4DVCDLET\*.* >&! NUL
  31. :TESTPARMS
  32.    if "%1" EQ "" goto WRAPUP
  33.    set VCFMT=EXT
  34.    iff not exist 4DVC%1.ZIP then
  35.       set VCFMT=FIL
  36.       iff not exist 4DVC%@ext[%1].ZIP then
  37.          shift
  38.          goto TESTPARMS
  39.       endiff
  40.    endiff
  41.    if "%VCFMT" EQ "FIL" for %%Z in (4DVC%@ext[%1].zip) do gosub LOOP
  42.    if "%VCFMT" EQ "EXT" for %%Z in (4DVC%1.zip) do gosub LOOP
  43.    shift
  44.    set VCFMT=
  45.    goto TESTPARMS
  46. :WRAPUP
  47.    iff "%VCOK" EQ "" then
  48.       cls
  49.       echo 4DVCDLET: No archive files found with extensions provided.
  50.       pause
  51.    endiff
  52.    set VCOK=
  53.    @del /qy 4DVCDLET\*.* >&! NUL
  54.    rd 4DVCDLET >&! NUL
  55.    cls
  56.    quit
  57. rem *******************************************************************
  58. rem
  59. rem Loop to obtain all entries in the .ZIP file and their descriptions
  60. rem
  61. rem At end of loop, the SELECT command is processed against the files.
  62. rem
  63. rem *******************************************************************
  64. :LOOP
  65.    cls
  66.    set VCOK=X
  67.    echo Processing archive file %@upper[%Z]. Please wait a moment.
  68.    iff "%VCFMT" EQ "FIL" then
  69.       PKZIP -q-vcbrd %Z %@name[%1].* >&! 4DVCDLET\4DVCDLET.0
  70.    else
  71.       PKZIP -q-vcbrd %Z >&! 4DVCDLET\4DVCDLET.0
  72.    endiff
  73.    set VCRCD=8
  74.    gosub LOOPTOP
  75.    return
  76. :LOOPTOP
  77.    if %@len[%@line[4DVCDLET\4DVCDLET.0,%VCRCD]] EQ 0 goto LOOPEND
  78.    if "%@substr[%@line[4DVCDLET\4DVCDLET.0,%VCRCD],1,6]" EQ "------" goto LOOPIN
  79. :LOOPOUT
  80.    set VCRCD=%@eval[%VCRCD + 1]
  81.    goto LOOPTOP
  82. :LOOPIN
  83.    set VCRCD=%@eval[%VCRCD + 1]
  84.    if "%@substr[%@line[4DVCDLET\4DVCDLET.0,%VCRCD],1,6]" EQ "------" goto LOOPOUT
  85.    set VCNAM=%@substr[%@line[4DVCDLET\4DVCDLET.0,%VCRCD],46,12]
  86.    set VCRCD=%@eval[%VCRCD + 1]
  87.    set VCCOM=%@substr["%@line[4DVCDLET\4DVCDLET.0,%VCRCD]                                                   ",10,41]
  88.    echo %Z >&! 4DVCDLET\%VCNAM
  89.    describe 4DVCDLET\%VCNAM "%VCCOM"
  90.    set VCCOM=
  91.    set VCNAM=
  92.    goto LOOPIN
  93. :LOOPEND
  94.    set VCRCD=
  95.    @del /q 4DVCDLET\4DVCDLET.0 >&! NUL
  96.    iff exist 4DVCDLET\DESCRIPT.ION then
  97.       keystack !
  98.       select /Or call 4DVCDLT2 (4DVCDLET\*.*)
  99.       keystack 00
  100.    else
  101.       drawbox 1  0 13 79 2 whi on yel fill yel
  102.       iff "%VCFMT" EQ "FIL" then
  103.          scrput  3 12     whi on yel No files found in archive %@upper[%Z] which match your request:
  104.          scrput  4 20 bri whi on yel         %@upper[%@name[%1]].000   thru   %@upper[%@name[%1]].999
  105.          scrput  5 12     whi on yel If you think this is an error, try running
  106.          scrput  6 20 bri whi on yel         PKZIP -q-vcbrd %@upper[%Z] %@upper[%@name[%1]].*
  107.          scrput  7 12     whi on yel manually from the command line.
  108.       else
  109.          scrput  4 12     whi on yel No files at all found in archive %@upper[%Z].
  110.          scrput  5 12     whi on yel If you think this is an error, try running
  111.          scrput  6 20 bri whi on yel         PKZIP -q-vcbrd %@upper[%Z]
  112.          scrput  7 12     whi on yel manually from the command line.
  113.       endiff
  114.       scrput  9  5     whi on yel If there are files present, then there is some problem writing to your
  115.       scrput 10  5     whi on yel disk (password/write protection, not enough space, etc.). Resolve the
  116.       scrput 11  5     whi on yel problem and try again. Press a key to continue.
  117.       screen 11 52
  118.       inkey /W180 %%VCRESP
  119.       set VCRESP=
  120.       cls
  121.    endiff
  122.    @del /qy 4DVCDLET\*.* >&! NUL
  123.    return
  124.