Zip Files What are Zip Files? Zip files (.zip file extension) are compressed files, also known as archives and they can contain one or more files and generally are reduced in size due to various compression algorithms employed. One of the main uses of zip files is to make the exchange of files easier. Instead of having to send or download multiple files that might total several Megabytes in size, you send or download only one Zip file, which is considerably smaller because of the use of compression technology. Common methods of compression include eliminating empty spaces in the file, and eliminating repetitive characters or strings and replacing them with a key (that is much smaller...it is used to regenerate them when the file is de-compressed). Some files cannot be compressed, as they are already in compressed format. Files such as these are merely stored within the archive and no compression is used. An example of this would be an .MP3 sound file, or even including another .zip file within a ZIP archive. Note that there is still some benefit to doing this; simply having the desired files contained in a single archive file is convenient for Internet file transfers and also space is still saved by having everything in one file, as there will be less disk cluster overhang (wasted space due to only partial usage of disk allocation units). Another advantage of archiving files in .zip file format is that there will be less chance of corruption. If a .zip file gets corrupted, chances are it simply will not open (de-compress or extract). This is particularly significant for download purposes, as if you download a corrupted .zip file and it won't open you know to just download it again rather than installing a corrupted program or file. The ZIP file format contains a built in Cyclic Redundancy Check algorithm (CRC-32) for error checking both when the file is created, when extracted by utility on the other end, and can be done manually using the program's test function. Additionally, once created, a .zip file cannot be infected by viruses (provided it was clean when created!!). This means that a .zip file can sit there on a server or in a directory on your hard drive and the programs within cannot be infected. What does this have to do with me? First and foremost, many of the files you will be downloading from the Internet will be in .zip format. If you haven't yet encountered these, you surely will and you need to be able to extract them. Also, you may want to learn how to create your own .zip files to facilitate sending email attachments to others, or simply to save disk space storing files for later use. Now, you need to download a ZIP utility. The next part of the tutorial covers the best utilities available. Which Zip Utility should I get? The very first utility of it's kind was PKZip (and PKUnZip which was included) for DOS. The ZIP standard was created in 1989 by Phillip Katz, hence the name "PKZip". It was originally a DOS utility with usage similar to "PKUnZip filename.zip". That's no fun, so several Windows ZIP utilities were created. PKZip now comes in a Windows version in addition to the original DOS version and can be obtained at www.pkware.com. Note that this program is SHAREWARE. The most popular ZIP utility by far is Winzip. It is fast, easy to use and has a lot of useful features. It is my favorite and I wouldn't have a computer without it. Get Winzip - www.winzip.com The only thing wrong with Winzip is that it is SHAREWARE. The authors want money for the product. It is well worth the money, but if you want freeware, I recommend the following program, ZipGenius. Get ZipGenius - http://www.zipgenius.it You can find more free Zip programs here: http://www.webattack.com/Freeware/downloader/fwzip.html Depending on which program you choose, the menu options can vary slightly and may not exactly match the following instructions but they will be similar and you should be able to figure it out pretty quickly. Install your program of choice, and let it assume the file association for .zip files. With Winzip (and most other Zip programs), this is done during setup. Simply choose Express Setup (recommended) and it will do this in addition to creating handy right-click Windows Explorer menu choices. Now that you have a utility installed, we'll proceed with learning how to use it. Unzipping Files You have just downloaded a program that came in the form of a .zip file and you have saved it to your download directory. Open Windows Explorer and browse to the directory where you have saved the .zip file. Double click the file to open it with WinZip (or your Zip utility of choice). I recommend that you just use Winzip in "classic mode" to have more control over what is going on. WinZip has a wizard, and if you chose that option during install, WinZip will open with the Wizard. You can change that though, just click Close when the Wizard pops up and then select the bullet to "start in classic mode". After double-clicking the file, the Zip program will display the contents of the .zip file. Any text files will be shown with a text file icon and you can double click them to automatically open them with notepad even before you unzip the file. This is especially handy for ReadMe files, as after reading it you may decide you don't even want to unzip the file and you can simply close the program and delete the file. At this point you can also invoke a virus scanner from within WinZip. Go to the Action menu in the program and choose Virus Scan. The first time you choose this, you will have to point it to where your Antivirus program's executable file is (e.g. C:\Program Files\Norton Antivirus\Navw32.exe). It will then scan the contents of the .zip file. To extract the contents of the file, choose Extract from the Action menu or simply click the Extract button on the toolbar. In the Extract To field, type the path to the directory you want to extract it to, or browse for it on the right by clicking the + signs to expand the folder trees on your drives. Choose either All Files or Selected Files (where only the highlighted file(s) will be extracted. When ready, click the Extract button in the dialogue. It will return to the main program screen and display the status (unless it's a really large file or you have a very slow computer it will be instantaneous). At this point you can close the Winzip program or go to File and choose Open Archive to open another file to unzip. Now that it is extracted - for the sake of this discussion let's assume it's a program to install - go to the directory you extracted it to and run the setup file. After this is done you can usually delete the files. Either way, the original .zip file remains intact until you physically delete it. You can tuck it away somewhere in case you ever want to extract it again. Winzip (and other Zip programs) will also extract other compressed file types such as cabinet files (.cab) that Microsoft uses for setup files. Need to extract an original copy of a .DLL from the Windows Setup Cabinet Files? Simply double click the cabinet file containing the desired file and it will open with WinZip. Highlight the file you want to extract, and click the extract button. With a file highlighted, the default choice is "selected files". Choose a directory to extract it to, and click the extract button in the dialogue. Unzipping files is pretty straight forward and easy. Creating ZIP files is also easy, and we'll cover that in the next section. Zipping Files There are a few ways to do this. You can go to Windows Explorer and highlight a single file and then right click and choose Add to (filename).zip from the menu. That will create a .zip file with the filename of the selected file. You can also choose Add to Zip in which case it will open WinZip at the Add to Archive dialogue and you can choose a filename and options. If you highlight multiple files Add to Zip is the only option available (but it's what you want anyway). If you are using another Zip tool, the right-click options may be labeled slightly different, but they are the same as the WinZip right-click options. The other way to do this (this is how I would do it) is to open the WinZip program and click the "New" button or from the File menu choose New Archive. You are then presented with a dialogue to browse for the destination and give it a filename (with the .zip extension). Do that, then click Open and another dialogue will pop up where you browse for and select the files you want to add to the archive. To select multiple files hold the Ctrl key as you click on them. Choose the option for Maximum Compression (might as well). Also, if you are including folders in the zip file make sure you select the option to "Include Subfolders". If you want to preserve the entire folder structure including the folder that the files are in, check the box "save extra folder info". This means, the person unzipping the file will get the folder structure intact when they unzip it. (unless they uncheck the box in the unzip dialogue "use folder names"). When you are finished, you will have a .zip file in the directory you created it. You should test it, simply double-click it and if it opens, it's ok. If you really want to check it you can invoke the CRC check by choosing Test from the Action menu. Create Self-Extracting Executable Files What if the person you are sending the file to doesn't have a ZIP utility? Then you can create a self-extracting executable file, in other words a program that will automatically extract the files when double-clicked or run. In order to do this, you have to first create a .zip file. After you have created it, you can immediately choose "Make EXE File" from the Action Menu. When you do this, a dialogue pops up where you can choose the default extract to location (e.g. %temp% which would be their default temp directory or choose a directory name. The directory will get created for them if they go with the default options when they run it). They will have the option of choosing an alternate location so don't worry. Alternatively, if you right click on a .zip file in Windows Explorer you'll see an option to create a self extracting exe file. Either way, once the file is created you should test it by double clicking it. http://www.PCNineOneOne.com