PKWARE Zipper

PKWARE® Frequently Asked Questions (FAQ) List

A text version of this FAQ list is also available.


This section lists some common questions about PKZIP for DOS. We hope you will find this information helpful.

PKZIP for DOS

Q. How do I compress a single file?

A. Compressing a single file is quite easy. Enter the directory where the file you wish to compress is located and type:

pkzip filename.zip myfile.ext

In the above example, filename.zip is the .ZIP file to be created and myfile.ext is the file to be compressed.

Q. How do I uncompress a .ZIP file?

A. Uncompressing a single file is just as easy as compressing a single file. Enter the directory where the .ZIP file is located and type:

pkunzip filename.zip

Q. How do I zip up subdirectories?

A. To zip up subdirectories, you must both recurse subdirectories and preserve path names. This is done with the -r and -P options in combination. The options may be placed together as -rP. An example:

pkzip -rP backup.zip c:\dir\*.*

When a .ZIP file is created with paths stored, these paths will be visible in a view of the file (-v). An example:

pkzip -v backup.zip

To re-create these subdirectories, or to place files into their original subdirectories, the -d option must be used with PKUNZIP. An example:

pkunzip -d backup.zip

Q. How can I compress my entire C drive using PKZIP?

A. The command to compress you entire C drive would be:

pkzip -& -rp a:\backup.zip c:\*.*

The -& is the option that indicates you wish to span the .ZIP file to multiple diskettes. The -rp option indicates you wish to preserve the path structures. If you want to backup a drive other than your C drive, use:

pkzip -& -rp: a:\backup.zip d:\*.*

This would backup your entire D drive. You can substitute any drive letter for d: on the above command line.

Q. Why do I get the message "Bad Command or Filename"?

A. If you see this message, DOS is telling you it can't find the program to which you are referring. This can happen because you are either not spelling the name of the program properly, you didn't put a space between the program name and its options, or the program is not in your path.

Please see the Installation section of your PKZIP for DOS manual, and your MS-DOS manual for more information.

Q. How do I span floppy diskettes?

A. To zip a single large file to multiple floppy diskettes, you should use the -& option. An example of this would be:

pkzip -& a:\backup.zip c:\myfile.ext

In the above example, A:\backup.zip is the .ZIP file to be created and C:\myfile.ext is the large file I wished to compress across the diskettes.

Q. Why can't I span under Windows NT?

A. The "&" character is a command line terminator under Windows NT, so you will need to place it in quotations for it to accept the option properly. Use the following example:

pkzip "-&" a:\backup.zip c:\myfile.ext

Q. How do I unzip a single file that is in a subdirectory in the .ZIP file?

A. Type PKUNZIP with the name of the .ZIP file and the name of the particular file you want.

Let's assume you have a file named test.ZIP file with these files in it:

file1.txt
apple\file2.txt
apple\banana\file3.txt

To extract only "file2.txt" from this .ZIP file, you must specify the complete name. This would include the path.

pkunzip test.zip apple\file2.txt

Note there is no leading slash. This is how PKUNZIP differentiates between the files you are extracting with paths, and the target directory. "file2.txt" would be extracted to the current directory. If you wanted to extract it with its subdirectory, simply include the -d option on the command line.

Using the above test.ZIP file, we could extract the entire contents of the apple subdirectory easily:

pkunzip -d test.zip apple\*.*

If we did it as shown above we would not only extract all the files in the "apple" subdirectory, but also the "banana" subdirectory below it and any files it contains.

To extract only the "apple" subdirectories contents, and nothing else, we must exclude those directories we do not wish to extract:

pkunzip -d test.zip apple\*.* -xapple\banana\*.*

If the "apple" subdirectory had multiple subdirectories off it, you would need to exclude each one individually on the command line.

Q. I am receiving insufficient memory when using PKZIP for DOS. Why?

A. If you are receiving an insufficient memory message, most likely it is because you are trying to compress more files than you have available conventional memory. PKZIP for DOS requires approximately 200K of conventional memory to run, plus 100 bytes per file you attempt to add. Your options are to free up more conventional memory if possible or to compress less files.

Using the above calculations, the DOS version can compress approximately 5000 files.

Note: PKZIP for Windows can compress up to 16,000 files.

Q. I am experiencing a problem with PKZIP and Novell 4.x. Is there a known problem?

A. We are aware of a problem with Novell 4.x and PKZIP for DOS. Please use a -~ option when compressing and it should correct the problem.

Q. My PKUNZIP reports I need version 7.3 or 2.8 to extract the file. What is the cause?

A. A bad FTP transfer. When a .ZIP file is not transmitted as a BINARY file, it will corrupt and cause PKUNZIP to incorrectly identify the version number. 2.04G is the current version of PKUNZIP. Re-transmit the file as a BINARY file, and PKUNZIP 2.04G will extract the file properly.

PKZIP for Windows FAQ | PKZIP for OpenVMS FAQ | General PKZIP Questions | Data Compression Library FAQ

If you did not find your question/answer in the preceding FAQ, please contact us.


Copyright © 1997 PKWARE, Inc. All Rights Reserved

PKWARE
Return to Customer Assistance Page