# Archive Handling

## Browsing Archives

The Virtual file systems (VFS) allows you to browse archives as if it was a directory. Currently &krusader; supports the following archives types: ace, arj, bzip2, deb, gzip, iso, lha, rar, rpm, tar, xz, zip, and 7-zip and supports the following passworded archives: arj, ace, rar and zip. Passwords can be stored in Kwallet. Please note that the archive support first needs to be properly configured in Konfigurator. To open the archive, use &Enter;, (double-)click or the Right Arrow. &krusader; supports also hidden archives, these are renamed archives with a *wrong* extension, ⪚ OpenOffice uses zip archives with the following extensions: `.odt`, `.sxw` and `.odw`. &Enter; will open the OpenOffice document and the Right Arrow will open the archive. Another example is J2EE, where the `.jar` extension means a zip archive. Since &krusader; auto-detects the supported archive types, it will open with Right Arrow even if it has another MIME type. Please note that browsing archives has a few limitations:

- Not all functions are supported by all archive types. (&ie;: you can not delete files in ace or rar archives)

- The permissions you have inside the archive are the same as the permissions you have for the archive.

- The command line (if visible) will not follow you inside the archive but will point to the archive directory.

- Before any action is performed on files/directories inside the archive, they must be extracted. The archive will be repacked when you leave it or when &krusader; detects that extracted files have changed.

- Packing and un-packing are "blocking operations" that display a progress dialog. However, this might change in the future since we are planning to create more background operations.

## Unpack Files

There are 2 ways to extract files from archives:

If you want to unpack a whole archive(s), browse to the archive location, select the archive(s) and select File Unpack or &Alt;&Shift; U. &krusader; will ask you where to put the extracted files. The default location is the inactive panel directory. If you do not cancel the operation, &krusader; will try to unpack all the selected files in the inactive panel.

If you only want to extract a part of the archive, then browse the archive and copy the files you want to extract to their new location just as you would copy "normal" files. Note that unpacking from a browsed archive takes more time (file by file unpack) compared to unpacking a whole archive with the first method. The unpack operation can be put in a queue.

## Packing Files

If you want to create a new archive, begin by selecting the elements you want to pack in the active panel and select File Pack or &Alt;&Shift; P. A dialog will pop-up prompting you to select the archive name and location. Select the packer from one of the supported file name extensions.

To add files to an existing archive(s), open the archive in one panel and the files to be copied in the other panel, then simply copy the files into the archive in exactly the same way you copy files into a "normal" directory. The pack operation can be put in a queue.

## Testing Archives

&krusader; will not handle corrupted archives since it may result in data loss. If you receive an error message when opening an archive, or if you suspect that there is something wrong with the archive, you should test it before use. To test an archive, browse (navigate) to the archive location and select the archive. Next select File Test Archive or &Alt; E. &krusader; will test the archive file and inform you whether the archive passed or failed the file integrity test.