Last Updated: 2015-01-16 Fri 16:19

Creating Zip Archives

Table of Contents

1 Introduction

Compressed archives are files that accomplish two things

  • The agglomerate several files into a single file for ease of transfer
  • They compress the contents so that the archive takes less space than the original version

All programming assignments will be submitted by creating a compressed archive and uploading the archive to Blackboard.

There are a variety of formats of compressed archive but we will use the ZIP format as utilities for dealing with the ZIP format are almost universally available without additional work. *Failure to submit in the ZIP format may result in a loss of credit on programming assignments.*

2 Creating Archives using Windows GUI

Windows 7 and 8 come with built-in support for creating and dealing with ZIP files. You can use the Windows GUI with to create an archive using the following steps.

  • Find the folder containing your programming assignment
  • Right click on the directory
  • Pick Send To -> Compressed Folder (.zip)

You should now have a compressed version of your folder.

compress1.png

compress2.png

3 Creating Archives using Mac OS X GUI

Mac OS X comes with built-in support for dealing with ZIP files from folders.

  • Click once on the folder you would like zip
  • Hold the Ctrl (control) key and click on the folder againn
  • A context menu should pop up
  • Select the Compress option which will create a zipped archive of the folder.

zip-file-folder-on-Mac.png

A Youtube video demonstrating creation of zip archives on Mac OS X is here.

4 Creating an Archive in Unix (Windows/Cygwin, Mac OS X, Linux)

If you have a sensible Unix environment set up you will have access to the zip and unzip programs which are useful for creating archives.

To zip a whole folder, navigate to the directory where the folder exists and use the command

zip zip-file-name -r directory-name

Below is a picture of zipping up the first-program directory which is done using the command

zip first-program.zip -r first-program

The subsequent commands verify that the zip was created and show its contents (with the unzip -l first-program.zip command). To the right is a picture of the visual view of the same directory which shows the folder and highlights the zip file that was created from it.

make-zip.png has-zip.png

A typical invocation is

zip ckauffm2-hw1.zip -r ckauffm2-hw1

which will make a compressed archive of all the files (programs/data) in a homework directory.


Author: Chris Kauffman (kauffman@cs.gmu.edu)
Date: 2015-01-16 Fri 16:19