[comp.binaries.ibm.pc.d] ZOO2ZIP allows ZIP fans to be content in a ZOO world

bradd@gssc.gss.com (Brad Davis) (01/02/91)

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!                ||

ts@uwasa.fi (Timo Salmi) (01/02/91)

In article <6491@gssc.UUCP> bradd@gssc.gss.com (Brad Davis) writes:
>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.
:

This is nice.  Incidentally, /pc/ts/tsbat23.arc has had a similar
facility with pracically the same name and mode of operation for
quite awhile. 

...................................................................
Prof. Timo Salmi        (Moderating at anon. ftp site 128.214.12.3)
School of Business Studies, University of Vaasa, SF-65101, Finland
Internet: ts@chyde.uwasa.fi Funet: gado::salmi Bitnet: salmi@finfun

jdudeck@polyslo.CalPoly.EDU (John R. Dudeck) (01/03/91)

In an article ts@uwasa.fi (Timo Salmi) wrote:
>>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.
>This is nice.  Incidentally, /pc/ts/tsbat23.arc has had a similar
>facility with pracically the same name and mode of operation for
>quite awhile. 

I don't think anyone has mentioned the obvious: PKCNVZOO, which is included
with the PKZIP package.  It converts zoo's to zip's, and even retains the
non-msdos filenames, and other stuff, when it does the conversion (although
I don't see why that would be any advantage for cpib postings).

I never use ZOO, I always change the files from cpib to zip's first, then
unpack them with PKZIP.

-- 
John Dudeck                                  "If it's Object Oriented then by
jdudeck@Polyslo.CalPoly.Edu                    definition it's A Good Thing".
ESL: 62013975 Tel: 805-545-9549                                 -- D. Stearns

roger@wrq.com (Roger Fulton) (01/03/91)

In article <27822437.1954@petunia.CalPoly.EDU> jdudeck@polyslo.CalPoly.EDU (John R. Dudeck) writes:
>
>I never use ZOO, I always change the files from cpib to zip's first, then
>unpack them with PKZIP.

Me too.







Roger Fulton
roger@wrq.com

jdudeck@polyslo.CalPoly.EDU (John R. Dudeck) (01/03/91)

In an article I wrote:
>I don't think anyone has mentioned the obvious: PKCNVZOO, which is included
                                                           ^^^^^^^^^^^^^^^^^
>with the PKZIP package.  It converts zoo's to zip's, and even retains the
>non-msdos filenames, and other stuff, when it does the conversion (although
>I don't see why that would be any advantage for cpib postings).

Keith Petersen pointed out to me that this is not included in the PKZIP
package, a fact which I had forgotten...

>I think you are talking about this file, which is *not* included:

>Directory PD1:<MSDOS.ZIP>
> Filename   Type Length   Date    Description
>==============================================
>PKCNVT11.ZIP  B   46080  900316  Convert Amiga arc/zoo/lzh files to ZIP on IBMs

>Keith

Thanks, Keith.  Yes, this is where to get PKCNVZOO.  It also has PKCNVT,
which converts arc's to zip's, and PKCNVLZH which converts lzh's to zip's.
It does not seem in any way to be limited to Amiga files!

-- 
John Dudeck                                  "If it's Object Oriented then by
jdudeck@Polyslo.CalPoly.Edu                    definition it's A Good Thing".
ESL: 62013975 Tel: 805-545-9549                                 -- D. Stearns

davidsen@sixhub.UUCP (Wm E. Davidsen Jr) (01/03/91)

In article <6491@gssc.UUCP> bradd@gssc.gss.com (Brad Davis) writes:

| 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.)

  I guess this is useful, but note that it makes no attempt to preserve
the comments.

  Also, this is embarrasing since I wrote the user's guide but never use
the "beginner" commands, does -extract handle the subdirectories?
-- 
bill davidsen - davidsen@sixhub.uucp (uunet!crdgw1!sixhub!davidsen)
    sysop *IX BBS and Public Access UNIX
    moderator of comp.binaries.ibm.pc and 80386 mailing list
"Stupidity, like virtue, is its own reward" -me