Appendix B: Using Archives
Home
Appendices
Next
Appendix C: The Command Prompt

Oftentimes, when you need to download something from the Internet, you will need multiple related files. Sometimes files need to be compressed to use less disk space. In both cases, you can use an archive file.

What is an Archive?

An archive is a file that contains a number of other files, somewhat like a folder. However, archives differ from folders in two ways:

These two qualities make archives excellent for keeping data on a computer or back disc for longterm storage. It also makes archives ideal for transporting files across the Internet.

Archives can also have subfolders. You can create an archive from the contents of a folder, and it will keep the internal directory structure intact.

Archives do have one disadvantage: files in an archive cannot be accessed without using program that can handle archives. Windows XP can open *.zip archives, but other programs can't use those files - they first have to be extracted from the archive. (See below for details.)

Archive Formats

Windows users typically deal with one of two archive formats: ZIP and RAR. ZIP has more widespread use and support; as mentioned above, Windows XP has support for ZIP archives built right in. RAR, though used less, has a better compression rate.

When creating archives, think about who's going to be using them. If you are going to using the archive and nobody else, you might want to use RAR. If you're going to be placing it on the Internet and lots of people are going to be using it, ZIP is a wiser choice. If you're creating the archive to send to someone else, e-mail them and ask them what format they prefer.

The leading program for working with ZIP archives is called WinZip. It costs money, but there is a free trial availiable at the WinZip website. The program most used for dealing with RAR archives is WinRAR. WinRAR costs $29, but, again, there is a 40-day free trial availiable at RARLab. WinRAR can handle both ZIP and RAR archives, so it will be used throughout this appendix.

Extracting Files from an Archive

Suppose you've recieved an archive through e-mail or downloaded it from the Internet, and you want to use the files in it. Open it up by double-clicking the archive in Windows Explorer, or by bringing up WinRAR and selecting File > Open Archive. The main WinRAR window lists the contents of the archive.

Opening a RAR archive in WinRAR
Figure B.1: Opening an archive in WinRAR

You can open any file by double-clicking it. However, to use the file in another program, or simply to keep it around on your hard drive, outside of the archive, you need to copy the file out of the archive. This is known as extracting it.

To extract files from an archive, select them and go to Commands > Extract to the specified folder or click the "Extract To" button on the toolbar.

Extraction Path and Options
Figure B.2: Extracting files

Select the folder that you want to place the files in from the folder tree on the right, and click OK. The files will then be extracted from the archive, and placed in the folder you specified. They can then be used like any other file.

Creating an Archive

Creating an archive can be easily done from Windows Explorer, without opening WinRAR. To create an archive, select the files to add to the archive and right click them. From the context menu that appears, click "Add to Archive...". You will then be presented with a dialog like that shown in Figure B.3.

Archive name and parameters
Figure B.3: Creating a new archive

From this dialog, you can select the type of archive (ZIP or RAR) that you want to use, and specify the file name. Then, click OK, and the archive will be created.

NOTE
The files you specified to be in the archive will not be deleted after the archive is created - a copy will remain outside of the archive.

A more convenient way to create an archive is to make one of a whole folder. This will include any subfolders and their contents inside the archive. Simply right-click the folder that you want to make an archive of, and click "Add to Archive." Set the type and file name as before, and click OK.

Adding New Files to Archives

To add new files to an existing archive, open it up in WinRAR and go to Commands > Add files to the archive or click the "Add" button on the toolbar. You will be presented with a standard Open dialog where you can select the files you want to add to the archive. Then, click OK and, on the next dialog, click OK again. This will add the files to the archive.

You can also add new files to an archive by right-clicking the file from Windows Explorer and selecting "Add to Archive...". From here, click "Browse" and navigate to the archive you want to add the file to. Then click OK, and the file will be added.



This should be all you need to know to start using ZIP and RAR archives. For more information, check out the WinRAR help files, or search the Internet with Google or another search engine. Happy archiving!

Home
Appendices
Next
Appendix C: The Command Prompt

Valid HTML 4.01!