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
/
4DVCBKP2.BTM
< prev
next >
Wrap
Text File
|
1991-01-04
|
6KB
|
144 lines
@echo off
if not exist %1 quit
set VCNAM=%@upper[%@name[%1]]
set VCEXT=%@upper[%@ext[%1]]
rem ****** No existing ZIP file yet?
iff not exist 4DVC%VCEXT.ZIP then
set VCVER=001
goto CHKVER
endiff
rem ****** get dates for ZIP and current files
@pkzip -vbdr 4DVC%VCEXT.ZIP %VCNAM.* >! 4DVC.0
@dir /CF %VCNAM.%VCEXT >! 4DVC.1
set VCDATEZ=%@substr[%@line[4DVC.0,9],35,2]%@substr[%@line[4DVC.0,9],29,2]%@substr[%@line[4DVC.0,9],32,2]
rem ****** No date for ZIP file? must be empty ZIP file; treat as new.
iff "%VCDATEZ" EQ "" then
set VCVER=001
goto CHKVER
endiff
iff "%@substr[%@line[4DVC.1,3],23,1]" EQ " " then
set VCDATED=%@substr[%@line[4DVC.1,3],29,2]0%@substr[%@line[4DVC.1,3],24,1]%@substr[%@line[4DVC.1,3],26,2]
else
set VCDATED=%@substr[%@line[4DVC.1,3],29,2]%@substr[%@line[4DVC.1,3],23,2]%@substr[%@line[4DVC.1,3],26,2]
endiff
set VCTIME=%@substr[%@line[4DVC.1,3],33,5]
if "%@substr[%@line[4DVC.1,3],33,1]" EQ " " set VCTIME=0%@substr[%@line[4DVC.1,3],34,4]
if "%@substr[%@line[4DVC.1,3],34,1]" EQ " " set VCTIME=00:00
rem ****** ZIP date < current?
if "%VCDATEZ" LT "%VCDATED" goto CALCVER
rem ****** ZIP date > current?
if "%VCDATEZ" GT "%VCDATED" goto NOARCH
rem ****** dates equal: check time stamp
iff "%@substr[%@line[4DVC.0,9],39,5]" LT "%VCTIME" then
set VCTIME=
goto CALCVER
endiff
:NOARCH
echo
cls
set VCDATEZ=
set VCDATED=
drawbox 0 0 9 79 2 yel on bla fill bla
scrput 2 2 bri yel on bla Bypassing archive request 4DVC%VCEXT.ZIP contains
scrput 2 28 yel on bla for file 4DVC%VCEXT.ZIP contains
scrput 2 37 bri yel on bla %VCNAM.%VCEXT.
scrput 3 2 yel on bla an entry which is dated equal to or more recently than the DOS date stamp
scrput 4 2 yel on bla on file Press a key to continue.
scrput 4 10 bri yel on bla %VCNAM.%VCEXT.
scrput 6 7 yel on bla Archive-File = %@substr[%@line[4DVC.0,9],29,8] %@substr[%@line[4DVC.0,9],39,5]
scrput 6 22 bri yel on bla %@substr[%@line[4DVC.0,9],46,12]
scrput 7 7 yel on bla Current-File = %@substr[%@line[4DVC.1,3],23,8] %VCTIME
scrput 7 22 bri yel on bla %VCNAM.%VCEXT
screen 4 48
set VCTIME=
inkey /W180 %%VCRESP
goto WRAPUP
:CALCVER
set VCTIME=
set VCDATEZ=
set VCDATED=
rem ****** bump the version number of the most recent archive by 1
set VCVER=%@substr[%@line[4DVC.0,9],2,-3]
set VCVER=%@eval[%VCVER + 1]
if %@len[%VCVER] EQ 0 set VCVER=001
if %@len[%VCVER] EQ 1 set VCVER=00%VCVER
if %@len[%VCVER] EQ 2 set VCVER=0%VCVER
if %@len[%VCVER] EQ 4 set VCVER=000
:CHKVER
iff exist %VCNAM.%VCVER then
echo
cls
drawbox 0 0 16 79 2 bri whi on red fill red
scrput 2 2 bri whi on red Cannot archive %VCNAM.%VCEXT.
scrput 2 31 whi on red 4DVC relies upon the availability of filenames
scrput 3 2 whi on red that end in 000 thru 999 (numeric, inclusive). This is because the file to
scrput 4 2 whi on red be archived in a .ZIP file (via PKZIP) must already be named exactly
scrput 5 2 whi on red what you want it to be (you cannot archive and then rename
scrput 5 45 bri whi on red %VCNAM.%VCEXT
scrput 6 2 whi on red it inside the .ZIP file). Therefore, the file must be renamed before
scrput 7 2 whi on red it is archived, archived under the new name, then renamed back to what
scrput 8 2 whi on red it was originally called. YOU HAVE A FILE IN THE DEFAULT DIRECTORY CALLED
scrput 9 2 bri whi on red %VCNAM.%VCVER.
scrput 9 16 whi on red RATHER THAN ERRONEOUSLY DELETE THAT FILE,
scrput 9 58 bri whi on red %VCNAM.%VCEXT
scrput 10 2 whi on red WILL NOT BE ARCHIVED. You may either delete files that end with .000
scrput 11 2 whi on red thru .999, or copy your other files to be archived to another directory
scrput 12 2 whi on red and archive them from there.
scrput 14 27 bri whi on red Press a key to continue.
screen 14 50
inkey /W180 %%VCRESP
goto WRAPUP
endiff
cls
drawbox 0 0 7 79 2 whi on blu fill blu
scrput 2 9 bri whi on blu About to archive %VCNAM.%VCEXT
scrput 2 39 whi on blu as in 4DVC%VCEXT.ZIP.
scrput 2 42 bri whi on blu %VCNAM.%VCVER
scrput 3 10 whi on blu Please enter a 40-character comment, or accept the default:
scrput 5 13 bri whi on blu Comment: [ ]
screen 5 24 ` `
screen 5 24
rem locate existing file description, or supply default if none
set VCRCD=
iff exist DESCRIPT.ION then
set VCRCD=0
else
goto NODESC
endiff
:FINDDESC
iff "%@line[DESCRIPT.ION,%VCRCD]" EQ "" then
:NODESC
set VCRCD=
keystack "%VCCOM %VCNAM.%VCEXT" @71
goto USERDESC
endiff
iff %@index["%@upper[%@line[DESCRIPT.ION,%VCRCD]]",%VCNAM.%VCEXT] EQ 1 then
keystack "%@substr["%@line[DESCRIPT.ION,%VCRCD] ",%@eval[%@len[%VCNAM.%VCEXT]+2],40]" @71
else
set VCRCD=%@eval[%VCRCD + 1]
goto FINDDESC
endiff
:USERDESC
rem Description determined. Present to user for modification/acceptance.
input %%VCRESP
@ren /q %1 %VCNAM.%VCVER
iff "%VCRESP" EQ "" then
iff "%VCRCD" EQ "" then
keystack "%VCCOM %VCNAM.%VCEXT" 13
else
keystack "%@upper[%@substr["%@line[DESCRIPT.ION,%VCRCD] ",%@eval[%@len[%VCNAM.%VCEXT]+2],40]]" 13
set VCRCD=
endiff
else
keystack "%@upper[%VCRESP]" 13
endiff
@pkzip -uqc 4DVC%VCEXT.ZIP %VCNAM.%VCVER >! NUL
@ren /q %VCNAM.%VCVER %1
:WRAPUP
if exist 4DVC.0 @del /q 4DVC.0 >&! NUL
if exist 4DVC.1 @del /q 4DVC.1 >&! NUL
set VCRESP=
set VCVER=
set VCEXT=
set VCNAM=