Working with archives (ZIP, ARJ, LZH, RAR, UC2, CAB, ACE)

 

Important note:

 

Most packers do NOT support Win95/98 and WinNT long filenames! Exceptions are the internal ZIP packer built into Total Commander, Zip-NT (ftp://ftp.uu.net/pub/archiving/zip/) and very new versions of UC2, RAR, LHA and ACE. If possible always use the internal ZIP packer! In this version Total Commander checks the created archive directly after packing to ensure that it isn't defective. This can be disabled by adding the line VerifyZip=0 to the section [Packer] in wincmd.ini.

 

What are archives?

 

Archives (packed files) are normal files with the extensions .ZIP, .ARJ, .LZH, .RAR, .UC2, .CAB, .ACE. Such files contain other files in a compressed form, which takes up less disk space than uncompressed files. To access these files, they have first to be uncompressed. Files with extension .TAR come from the UNIX world - they are usually packed into a GZIP file (ending with .GZ). They can now also be modified with Total Commander. The CAB archive format is used by Microsoft for installation programs. CAB archives can only be unpacked by Total Commander. CAB files are only supported by the 32 bit version.

 

Self extracting archives

 

Total Commander also supports self extracting archives with EXE or COM extension. To open such an archive, place the cursor on the file and press CTRL+PgDn. To create a self extracting ZIP archive, rename a ZIP file to an EXE file. Total Commander will then ask if you want to create a self extracting ZIP archive.

New in TC 6.55: The self-extracting module is now 32-bit. It still runs under Windows 3.1. However, Win32s has to be installed. The self-extracting module (16 bit sfxhead.sfx) can be downloaded from our homepage.

 

How to produce archives?

 

To pack and unpack files, you need special pack programs like pkzip.exe, pkunzip.exe, arj.exe, lha.exe, rar.exe, uc.exe and ace.exe. Total Commander can act as a shell for these programs. Additionally Total Commander contains a PKzip-compatible internal packer, which supports nearly all functions of PKzip, even the creation of multi-volume ZIP files! Only the encryption isn't supported because of the restrictive Swiss export laws ("inspired" by the former U.S. export laws). The packer is based on Zlib by Jean-loup Gailly. The C source is freely available at the following ftp address on the Internet: ftp://ftp.uu.net/pub/archiving/zip

.CAB archives can only be unpacked, NOT created by Total Commander.

Additional packer plugins are available on our addons page on www.ghisler.com.

New in version 5.0: Internal .TAR, .GZ and .TGZ packer! .TGZ directly creates a .TAR file inside a .GZ file in one operation.

 

Using Total Commander as an archiver shell

 

Total Commander can work with packed files as if they were directories. This means that you can double click (or press ENTER) on such an archive, and Total Commander will show the contents of this file. All files packed into the archive are shown in a normal file window.

 

If a file was packed into the archive together with its path, the relevant directories are shown as normal directories. You can navigate in these directories as normal and unpack any files and even complete directories. If you want to know more about a packed file, just press ENTER to show details like full path, compression method and ratio.

 

Total Commander can now also open archives in archives! To unpack an archive to a temporary directory, just press ENTER on that archive. If the archive has an unusual extension, or is a self extracting archive, you must press CTRL+PgDn instead. When you leave the archive by switching to its parent directory, or by switching to a different drive, the archive will be automatically deleted from the temporary directory.

 

Packing / unpacking with Total Commander

 

Unpacking

 

Open the file to be unpacked in one of the file Windows (by double clicking on its filename). Change the path of the other file window to the destination where you want to put the files. In the source directory, choose the files you want to unpack. Press F5 (copy). This opens the dialog for unpacking files. To unpack all files, just press ALT+F9. Total Commander has built-in unpackers for ZIP, ARJ, LZH, .RAR, .TAR, .GZ, .CAB and .ACE files.

 

Packing

 

Choose the files you want to pack. Then choose pack from the menu Files or press ALT+F5. A dialog will appear, where you can select options for packing the files. ENTER the desired file name for the archive you want to create. After you press ENTER, the files are packed to this file.

 

To move (pack & delete) the selected files, press SHIFT while pressing ALT+F5 or choosing pack from the menu.

 

Important: In the dialog box you must specify the name of the packer (zip, arj, lha, rar, uc2 or ace) and a colon in front of the file name, e.g. zip:c:\test.zip, otherwise the files will be copied/moved normally!!!

 

If you have configured Total Commander to use the internal ZIP packer you can still use the external packer (PKzip or zip-nt): Instead of ZIP: place the string EXT: (for external) in front of the ZIP filename! You can also force the internal ZIP packer by specifying INT:.

 

Adding files to an existing archive

 

If you want to add files to an existing archive, proceed as follows: open the archive file in one file window. Select the files and directories you want to add in the other window. Press F5 to pack the selected files. This will again show the dialog for packing, pressing ENTER starts the appropriate packer. TGZ, GZ and CAB archives cannot be modified.

 

Pressing F6 will move (pack & delete) the selected files.

 

Restriction: You cannot add files to any subdirectory of an archive, except with the internal ZIP packer and with UC2. However, you can add whole directories with all their files. You can choose whether you want to save the packed files including their paths, or simply the files alone. To add files to a subdirectory with the internal packer or with Uc2 you must separate the subdirectory with a forward slash / , not a backslash!

Example: zip:c:\test.zip/this\is\a\subdir

 

Deleting files from an archive

 

Open the archive you want to delete files from by double clicking on it. Select the files and/or directories you want to delete and press F8 to delete them.

 

List files from an archive

 

To show files with the built-in or external lister, just press F3. After a warning dialog box, the file is unpacked and then shown. After you close the lister, the temporary file is deleted though the original archive is not affected.

 

Edit files from an archive

 

To edit a file with the editor of your choice, just press F4. The file is then automatically unpacked and will be repacked into the archive if it was changed with the editor. Repacking will NOT work to TGZ, GZ and CAB archives! Instead, the modified file will not be deleted and remain in the temporary directory.

 

To edit a file with its associated program, press ENTER, then select Unpack and Execute. The file is then automatically unpacked. It can also be repacked if it was changed.