home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Dr. CD ROM (Annual Premium Edition)
/
premium.zip
/
premium
/
DOSUTIL2
/
ZIPALL11.ZIP
/
ZIPALL1.BAT
< prev
next >
Wrap
DOS Batch File
|
1993-05-02
|
2KB
|
55 lines
@echo off
REM
REM ZIPALL1.BAT
REM
REM This BAT file can be executed from within any subdirectory to cause PKZIP
REM to implode every file in the current directory BUT NOT THOSE IN ITS CHILD
REM DIRECTORIES (if any) into a single file called ALLFILES.ZIP. All the ori-
REM ginal files are moved (-m) into the ZIP file, the affected directory is
REM empty except for ALLFILES.ZIP. Hidden and system files are zipped, also,
REM and the file attributes for Hidden, System and Readonly files are retained.
REM Use the UNZIPALL.BAT file when necessary. Use ZIPALL1T.BAT to accomplish the
REM same feat while retaining the original files (copy instead of move).
REM ALLFILES.ZIP should be unzipped with the "-Jhrs" switch if
REM PKUNZIP.EXE is used instead of UNZIPALL.BAT.
REM
if not exist allfiles.zip goto continue
cls
dir /w
echo.
echo This subdirectory already contains an ALLFILES.ZIP. Delete it and use
echo ZIPALL1 if you want to save changes made to the other files since it was
echo last unzipped - OR - use RESTZIP if you want to restore the original
echo ALLFILES.ZIP as the only file in the subdirectory.
goto exit
:continue
if exist zipall1.usd del zipall1.usd
pkzip allfiles *.* -ex -whs -Jhrs -m
if errorlevel 1 goto errexit
pdel allfiles.zip /o /eq /ba /wh /nt
REM ***************** USER MUST EDIT THE FOLLOWING LINE *********************
REM ***************** TO INDICATE WHERE ZIPALL1.USD IS !!! *****************
copy c:\pkware\zipall1.usd
if not exist zipall1.usd goto usdexit
dir
echo.
echo ZIPALL1.USD dummy file added to indicate ZIP of current subdirectory only.
echo ALLFILES.ZIP has been successfully created, moving the original files.
echo Child subdirectories, if any, are intact and have not been processed.
echo Use UNZIPALL.BAT to unzip, or PKUNZIP.EXE with the "-Jhrs" switch.
goto exit
:usdexit
echo Error in execution of ZIPALL1.BAT.
echo DID YOU READ THE INSTALLATION INSTRUCTIONS?
echo You must edit two lines in RESTZIP.BAT and one line in ZIPALL1.BAT to
echo change the hardcoded location of ZIPALL1.USD from "c:\pkware" to
echo wherever you decided to install these batch files (and ZIPALL1.USD).
echo Just locate the string "c:\pkware" and edit appropriately.
pause
goto exit
:errexit
echo Error in execution of PKZIP (via ZIPALL1.BAT).
:exit
prompt $p$G
echo on