home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Carsten's PPE Collection
/
Carstens_PPE_Collection_2007.zip
/
T
/
THTCK140.ZIP
/
UNZ.BAT
< prev
next >
Wrap
DOS Batch File
|
1994-06-18
|
4KB
|
112 lines
@echo off
:del_temp
REM MSDos 6.0+ Command to remove Work Directory
REM IF EXIST C:\TEMP%PCBNODE%\*.* DELTREE /Y C:\TEMP%PCBNODE%
REM 4DOS Command to delete all file's in TEMP Work Directory
IF EXIST C:\TEMP%PCBNODE%\*.* DEL C:\TEMP%PCBNODE% /Y/S/X
:MKDIR
REM *** I am useing DRIVE "C" for My work drive make sure you edit this
IF NOT EXIST C:\TEMP%PCBNODE% MD C:\TEMP%PCBNODE%
REM 4DOS Find File Extention
if %@ext[%1]==zip goto zip
if %@ext[%1]==lzh goto lzh
if %@ext[%1]==arj goto arj
REM *** If you are running straight DOS then use these lines below
REM DOS'S FIND FILE EXTENTION
REM testfile %1 LZH ARJ ZIP
REM IF ERRORLEVEL 4 GOTO TEST_TXT
REM IF ERRORLEVEL 3 GOTO ZIP
REM IF ERRORLEVEL 2 GOTO ARJ
REM IF ERRORLEVEL 1 GOTO LZH
goto end_program
:ZIP
rem ■ ZIP archive detected
REM *** STRIP AUTHENTIC VERIFICATION ***
STRIPAV -p %1 >NUL
REM *** CHECK ZIP FOR CRC ERRORS ***
pkunzip %1 -d C:\TEMP%PCBNODE%
REM *** I RUN Antiad to remove BBS ADS if you don't then REM out the next
REM *** Three Lines and put your pkzip -d %1 @file.lst command in
C:\PCB\ANTI\antiad.exe -cC:\PCB\ANTI\antiad.cfg -pC:\TEMP%PCBNODE%\ -LC:\ANTI%PCBNODE%
IF EXIST C:\ANTI%PCBNODE% c:\util\pkzip {d %1 @C:\ANTI%PCBNODE%
IF EXIST C:\ANTI%PCBNODE% DEL C:\ANTI%PCBNODE%
REM ************************************************************************
REM **** The line Below is REQUIRED FOR AGE CHECKING!!!!! *****************
FV.COM %1 >%PCBDRIVE%%PCBDIR%\filelist.arc
REM ************************************************************************
REM **** The line Below is REQUIRED FOR DIZ insertion!!!!! ****************
IF EXIST C:\TEMP%PCBNODE%\FILE_ID.DIZ COPY C:\TEMP%PCBNODE%\FILE_ID.DIZ %PCBDRIVE%%PCBDIR%\DIZ.%PCBNODE%
IF EXIST C:\TEMP%PCBNODE%\*.ZIP MD C:\TEMP%PCBNODE%\TEMP%PCBNODE%
IF EXIST C:\TEMP%PCBNODE%\*.ZIP pkunzip -d -o C:\TEMP%PCBNODE%\*.ZIP C:\TEMP%PCBNODE%\TEMP\%PCBNODE%
IF ERRORLEVEL == 50 GOTO ZIP_ERROR
IF ERRORLEVEL == 8 GOTO ZIP_ERROR
IF ERRORLEVEL == 2 GOTO ZIP_ERROR
IF ERRORLEVEL == 1 GOTO ZIP_ERROR
goto end_program
:ARJ
REM ■ ARJ archive detected
REM ************************************************************************
REM **** The line Below is REQUIRED FOR AGE CHECKING!!!!! *****************
FV.COM %1 >%PCBDRIVE%%PCBDIR%\filelist.arc
arj x -x@exclude.lst %1 C:\TEMP%PCBNODE% >NUL
IF ERRORLEVEL == goto ZIP_ERROR
if errorlevel == 1 goto ZIP_ERROR
REM ************************************************************************
REM **** The line Below is REQUIRED FOR DIZ insertion!!!!! ****************
IF EXIST C:\TEMP%PCBNODE%\FILE_ID.DIZ COPY C:\TEMP%PCBNODE%\FILE_ID.DIZ %PCBDRIVE%%PCBDIR%\DIZ.%PCBNODE%
goto end_program
:LZH
REM ■ LHA archive detected
REM ************************************************************************
REM **** The line Below is REQUIRED FOR AGE CHECKING!!!!! *****************
FV.COM %1 >%PCBDRIVE%%PCBDIR%\filelist.arc
lha x %1 C:\TEMP%PCBNODE%\ >NUL
if errorlevel == 1 goto ZIP_ERROR
REM ************************************************************************
REM **** The line Below is REQUIRED FOR DIZ insertion!!!!! ****************
IF EXIST C:\TEMP%PCBNODE%\FILE_ID.DIZ COPY C:\TEMP%PCBNODE%\FILE_ID.DIZ %PCBDRIVE%%PCBDIR%\DIZ.%PCBNODE%
GOTO END_PROGRAM
:ZIP_ERROR
REM MSDos 6.0+ Command to remove Work Directory
REM IF EXIST C:\TEMP%PCBNODE%\*.* DELTREE /Y C:\TEMP%PCBNODE%
REM 4DOS Command to delete all file's in TEMP Work Directory
IF EXIST C:\TEMP%PCBNODE%\*.* DEL C:\TEMP%PCBNODE% /Y/S/X
REM ■ CRC ERROR!
ECHO FAILED TESTS: ARCHIVE CONTAINS ERRORS >%PCBDRIVE%%PCBDIR%\WORK\PCBFAIL.TXT
REM 4DOS MOVE COMMAND
MOVE %1 C:\bad.dir
REM DOS'S MOVE COMMAND
REM MOVE /Y %1 C:\bad.dir
GOTO END_program
rem *** REJECT FALSE FORMAT (LHA/ARJ) ***********************************
:INVALID
REM ■ LHA OR ARJ
ECHO FAILED TESTS: INVALID ARCHIVE (ARJ OR LHA) >%PCBDRIVE%%PCBDIR%\WORK\PCBFAIL.TXT
GOTO END_program
:end_program