Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!usc!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ogicse!cvedc!gssc!bradd From: bradd@gssc.gss.com (Brad Davis) Newsgroups: comp.binaries.ibm.pc.d Subject: ZOO2ZIP allows ZIP fans to be content in a ZOO world Message-ID: <6491@gssc.UUCP> Date: 1 Jan 91 22:28:25 GMT Sender: bradd@gssc.UUCP Organization: Graphic Software Systems, Inc. Beaverton, Or. Lines: 88 Since there seems to be some danger of the ZIP vs. ZOO war breaking out again, I thought I might contribute a little batch program to help my fellow ZIP fans be content with a ZOO-oriented group. With ZOO2ZIP, converting .ZOOs to .ZIPs is trivial - just type ZOO2ZIP *.ZOO and there are your .ZIPs. You can delete the .ZOO files and you never have to mess with ZOO again. (You could modify ZOO2ZIP.BAT to delete the .ZOOs automatically if you wanted to, but I prefer to do that manually.) TOOLS WHICH ZOO2ZIP EXPECTS: ZOO.EXE to extract the files from the .ZOO PKZIP.EXE to create the new .ZIP RM.EXE (with /r option) to remove temporary directories If you don't have an RM-like tool to remove a directory and it's contents, you can use the DOS DELete and RMDIRectory commands. (DELete requires confirmation from the keyboard which is why I did not use it.) Zoo2Zip is actually *two* batch files: ZOO2ZIP.BAT breaks up wildcards into individual file names and CALLs _ZOO2ZIP.BAT for each file in turn. Note that ZOO2ZIP requires at least DOS 3.3 (or 4DOS) since the CALL command was not included in older versions of DOS. (4DOS, for those who haven't seen it yet, is a very slick replacment for COMMAND.COM. Highly recommended.) If I get requests from users of older DOS versions begging for a pre-DOS 3.3 version of Zoo2Zip, I'll cook one up and post it here also. (Unless I get severely chastised for posting "binaries" in a .d group, that is :-) Here is ZOO2ZIP.BAT ------8<------- Clip and save ------8<--------- Valuable coupon -------8<----- @echo off if "%1" == "" goto help rem Temp files in _z2ztmp_ mkdir _z2ztmp_ if errorlevel 1 goto exists rem Accumulate ZIP files in _z2zzip_ mkdir _z2zzip_ if errorlevel 1 goto exists :loop for %%f in (%1) do call _zoo2zip %%f if errorlevel 1 goto exists shift if not "%1" == "" goto loop rm /r _z2ztmp_ copy _z2zzip_\*.* *.zip rm /r _z2zzip_ goto end :help echo Usage: zoo2zip FILE [FILE [...]] echo where FILE is the name of a .ZOO file to be converted. echo Wildcards are OK. :exists echo Error: unable to create temporary directories _z2ztmp_ or _z2zzip_ :end ------8<------- Clip and save ------8<--------- Valuable coupon -------8<----- Here is _ZOO2ZIP.BAT ------8<------- Clip and save ------8<--------- Valuable coupon -------8<----- @echo off echo %1 if "%1" == "" goto help cd _z2ztmp_ zoo -extract ..\%1 cd .. pkzip -a -ex _z2zzip_\%1 _z2ztmp_\*.* rm _z2ztmp_\* goto end :help echo ERROR processing %1 :end ------8<------- Clip and save ------8<--------- Valuable coupon -------8<----- Random drivel from the keyboard of: +--+ Brad Davis, GSS Inc, Beaverton OR _________ -_--_ ________________|80|__ bradd@gssc (503) 641-2200 -- -- =o==o= -- -- -- -- +__+ Disclaimer: The boss disavows ----------------------------------||--- all knowledge of my actions. Whfg fnl AB gb 65! ||