[comp.os.msdos.apps] PKUNZIPping directory trees

ee5391aa@triton.unm.edu (Duke McMullan n5gax) (03/04/91)

PKZIP has an option for storing pathnames, but is there any way to get it
to store a directory, its contents and all subdirectories thereof in such
a way that PKUNZIP will restore that portion of the tree?

I've kicked this back and forth for a while and gotten nowhere.  HALP!

					Thanks,
					    d


--
	"It is difficult for me to comprehend the fact that some people
      actually do not consider all uses of explosives to be recreational."
						-- Ragnar Benson
  Duke McMullan n5gax nss13429r phon505-255-4642 ee5391aa@triton.cirt.unm.edu

valley@uchicago (Doug Dougherty) (03/04/91)

ee5391aa@triton.unm.edu (Duke McMullan n5gax) writes:

>PKZIP has an option for storing pathnames, but is there any way to get it
>to store a directory, its contents and all subdirectories thereof in such
>a way that PKUNZIP will restore that portion of the tree?

I think it has been said before, but you need to use the -d switch on PKUNZIP.
In fact, I know someone who always uses -d with PKUNZIP (can't hurt and
it makes for one less thing to remember)  I seriously wonder why it
isn't the default.  I can't imagine why anyone would want to flatten the
structure (or if they did, you'd certainly want that to be the special
case that requires the command line switch)

mhr@mendip.UUCP (MHR {who?}) (03/05/91)

In <1991Mar03.171051.20116@ariel.unm.edu>, ee5391aa@triton.unm.edu writes:
> PKZIP has an option for storing pathnames, but is there any way to get it
> to store a directory, its contents and all subdirectories thereof in such
> a way that PKUNZIP will restore that portion of the tree?
> 
> I've kicked this back and forth for a while and gotten nowhere.  HALP!
> 
I thought this had been answered already, but here goes (again?) anyway:

According to the command line help screens, PKZIP -pr <zipfile> <files>
will recurse the subdirectories from the CD and store the pathnames in
the zip file.  PKUNZIP -d <zipfile> will recreate directories stored in
the zip file.

I hope this answers your question.

Regards.
-- 
Mark A. Hull-Richter    UUCP:     ccicpg!mhr    In all things, restraint,
ICL North America       InterNet:                 especially with respect
9801 Muirlands Blvd       rlgvax!mhr@irv.icl.com  to posting articles and
Irvine, CA  92713       (714)458-7282x4539        doubly so for flames.

bytehead@bluemoon.uucp (Bryan Price) (03/06/91)

ee5391aa@triton.unm.edu (Duke McMullan n5gax) writes:

> PKZIP has an option for storing pathnames, but is there any way to get it
> to store a directory, its contents and all subdirectories thereof in such
> a way that PKUNZIP will restore that portion of the tree?

You create the ZIP with the -p (or -P to keep all of the directory
information) and the -r (recursive command).

Unzipping is a little different.  Use the -d command on PKUNZIP to create 
the subdirectories that will be in the ZIP file.  Works like a charm for 
me.



Bryan (bytehead@bluemoon)

sguerke@brahms.udel.edu (Stephen Guerke) (03/06/91)

I always zip files with the following

      pkzip -arp [filename.zip] root/subdir/*.*  root/arc.dir/

    This will recursively zip all the files and subdirectories and
their files from the *.*n, and place the filename.zip file in the
/arc.dir/ (be sure the second backslash is there).  	

    To unzip the file and the entire directory structure that you
zipped all you need do is type the following command line:

  pkunzip -d filename.zip

    By substituting the -u (update) command for the -a (add) command
you can easily write a batch file which will allow you to make weekly
backups (or daily) of your work files with ease.

lowey@herald.usask.ca (Kevin Lowey) (03/06/91)

From article <19342@brahms.udel.edu>, by sguerke@brahms.udel.edu (Stephen Guerke):
>   pkunzip -d filename.zip
> 
>     By substituting the -u (update) command for the -a (add) command
> you can easily write a batch file which will allow you to make weekly
> backups (or daily) of your work files with ease.

One warning.  I run a Fidonet BBS, which is connected to our campus Ethernet
system.  (This is handy, as the files are then available equally well to all
the campus microcomputers on the net, as well as all Vaxes on campus, and
in the future perhaps by FTP).

I was doing my backups using PKZIP to pack the files onto a network drive,
then I submitted a batch job that would put that file out onto tape from the 
VMS side.

Some of my PC directories have hundreds of files (message files for the Amiga 
echomail area for instance).  In total I had thousands of files on the hard
disk.  PKZIP gagged on this, saying something about attempting to put too 
many files into the archive.

I ended up using ZOO instead, which appears not to have this problem.  I still
use PKZIP for my own computer (which has fewer files) as PKZIP  with the -es
option is faster at creating the archives than ZOO is with no compression!

- Kevin Lowey  

) (03/06/91)

In article <1991Mar03.171051.20116@ariel.unm.edu> ee5391aa@triton.unm.edu (Duke McMullan n5gax) writes:
>PKZIP has an option for storing pathnames, but is there any way to get it
>to store a directory, its contents and all subdirectories thereof in such
>a way that PKUNZIP will restore that portion of the tree?
>
>I've kicked this back and forth for a while and gotten nowhere.  HALP!
>
>					Thanks,
>					    d
>



I believe if you use the parameter "-d" when you unzip, that should recreate
the directory tree as it was Zipped...



---

  Steve Bibbo                       UUCP : bibbo@moncol.UUCP (The Monk!)
  Monmouth College                  Internet: moncol!bibbo@princeton.edu
  West Long Branch, NJ              CompuServe: 72657,602

tporczyk@na.excelan.com (Tony Porczyk) (03/06/91)

The News Manager)
Nntp-Posting-Host: na
Reply-To: tporczyk@na.excelan.com (Tony Porczyk)
Organization: Standard Disclaimer
References: <1991Mar03.171051.20116@ariel.unm.edu>
Date: Mon, 4 Mar 1991 19:04:40 GMT

In article <1991Mar03.171051.20116@ariel.unm.edu> ee5391aa@triton.unm.edu (Duke McMullan n5gax) writes:
>a way that PKUNZIP will restore that portion of the tree?

PKZIP -p -r
PKUNZIP -d

Tony

mcc@WLV.IMSD.CONTEL.COM (Merton Campbell Crockett) (03/06/91)

 In article <15713@mendip.UUCP> mhr@mendip.UUCP (MHR {who?}) writes:
 >In <1991Mar03.171051.20116@ariel.unm.edu>, ee5391aa@triton.unm.edu writes:
 >> PKZIP has an option for storing pathnames, but is there any way to get it
 >> to store a directory, its contents and all subdirectories thereof in such
 >> a way that PKUNZIP will restore that portion of the tree?

 >According to the command line help screens, PKZIP -pr <zipfile> <files>
 >will recurse the subdirectories from the CD and store the pathnames in
 >the zip file.  PKUNZIP -d <zipfile> will recreate directories stored in
 >the zip file.

Use the -h option with either program for the switch options.  One caution
concerning the backup and restore operation with the above switches.  The
restore operation will restore everything as a subdirectory tree from the
directory you are in.  If /a/b/c is the structure and you are in /a when
you restore, the new structure will be /a/a/b/c.  Oops. substitute "\" for
"/" in the above--hate when that happens.

Merton

valley@uchicago (Doug Dougherty) (03/06/91)

lowey@herald.usask.ca (Kevin Lowey) writes:

>From article <19342@brahms.udel.edu>, by sguerke@brahms.udel.edu (Stephen Guerke):

>One warning.  I run a Fidonet BBS, which is connected to our campus Ethernet
>system.  (This is handy, as the files are then available equally well to all
>the campus microcomputers on the net, as well as all Vaxes on campus, and
>in the future perhaps by FTP).

>Some of my PC directories have hundreds of files (message files for the Amiga 

I think you may be running an obsolete version of PK(UN)ZIP.  The
current version is 1.10, and I think that all versions prior to 1.10 had
a 3900 file per .ZIP file limit.  This limit was lifted in 1.10.

Supposedly, there is no systemic limit at all now, but in practice, the
limit is based on how much available memory you have.  Anyone have any
information or antecedotes related to just what this means, in practice?

roy%cybrspc@cs.umn.edu (Roy M. Silvernail) (03/07/91)

ee5391aa@triton.unm.edu (Duke McMullan n5gax) writes:

> PKZIP has an option for storing pathnames, but is there any way to get it
> to store a directory, its contents and all subdirectories thereof in such
> a way that PKUNZIP will restore that portion of the tree?

Sure.... to create:

PKZIP -rp zipname *.* (wildcard optional if files are in the initial
directory, but required if there are only subdirs)

Or

PKZIP -rP zipname *.* (to store absolute pathnames... i.e. beginning
from c:\foo will store all files as 'foo\whatever')

And to unpack:

PKUNZIP -d zipname
--
Roy M. Silvernail --  roy%cybrspc@cs.umn.edu - OR-  cybrspc!roy@cs.umn.edu
  perl -e '$x = 1/20; print "Just my \$$x! (adjusted for inflation)\n"'
        [space reserved for clever quote]{mail your submissions}

dscavo@ncratl.AtlantaGA.NCR.COM (David Scavo) (03/13/91)

>>PKZIP has an option for storing pathnames, but is there any way to get it
>>to store a directory, its contents and all subdirectories thereof in such
>>a way that PKUNZIP will restore that portion of the tree?
>>
>>I've kicked this back and forth for a while and gotten nowhere.  HALP!

When zipping, specifiy option -rp (tell it to recursively store the
directories and save the path name for each file). Also, when unzipping,
use the option -d (to create directories). I have used this many, many times
and it works like a charm....

Example:   pkzip -arp foobar c:\test     (this will store all files in test
                                          and all of test's subdirectories
                                          and files in them.)

           pkunzip -ed foobar d:         (Makes directory d:\test and all 
                                          subdirectories and puts files in 
                                           them.)
Hope this helps......
-- 
   --------------------------------------------------------------------------
   Internet: dscavo@ncratl.AtlantaGA.NCR.COM              NCR Corporation
   UCCP: ... !gatech!kong!ncratl!dscavo                   2651 Satellite Blvd
    "Bart, you say butt kisser like it is a bad thing"    Duluth, GA 30136