Guide · 05

Archives

ZIP, 7z, RAR and TAR open like folders: look inside, preview, extract – and edit ZIP files right where they are.

Archives open like folders

You don't need an extra program to look into an archive. Double-click it, and Tern Files opens it like a folder – with tabs, sorting, views and two panes, as you are used to. All of this is free, also after the trial.

  • Formats: ZIP, 7z, RAR and TAR – also compressed as .tar.gz, .tgz, .tar.bz2 and .tar.xz – and single files packed with GZ, BZ2 or XZ.
  • Above the list you see how many items the archive holds and how big they are, for example 42 items · 1.2 GB unpacked · 380 MB packed, and a chip with the format.
  • The column Packed shows how much space each entry takes inside the archive.
  • Archives inside archives open the same way. Alt+↑ or Backspace takes you up, and at the top level out of the archive into its folder.

Prefer your old archive program? Set Archives on double-click under Settings › General to Default program. Either way the context menu has Open as folder and Open with default program. Documents that are ZIP files inside – such as .docx, .xlsx or .jar – always open normally; Open as archive in the context menu shows what is inside them.

An archive that is only online in OneDrive is not downloaded on its own. Tern Files asks first: Download fetches it.

Look inside and open entries

Inside an archive most things work as in a normal folder:

  • Filter: just type, or press Ctrl+F. Switch on Whole archive next to the filter to search every entry of the archive, not only the current folder; each hit shows its path inside the archive.
  • Preview: select an entry and press Space – pictures, PDFs, text and Office files show up as usual. Very large entries say Too large for the preview – extract it first.
  • Open: Enter or a double-click unpacks the entry into a cache and opens it in its program. Files from an archive you downloaded from the internet keep that mark, so Windows and Office stay just as careful with them.
  • Drag: drag entries into another program, onto the desktop or into an e-mail – they are unpacked on the way. For very large entries Tern Files says Too large to drag – use “Extract to …”.

If you open a program from an archive, Tern Files asks Start “…”? first, because programs often need more files from the archive. Extract all … unpacks everything first – that is usually the better choice. Only start this file runs just this one.

If you change an opened entry and save it, Tern Files offers to put it back into the archive – see Changed files back into the archive.

Extract

Extracting works from outside and from inside the archive:

  • Extract all (Ctrl+Shift+E) – unpacks the whole archive next to it, whether you are inside it or have it selected in its folder.
  • Extract here – if the archive holds exactly one folder at the top, that folder lands next to the archive; otherwise Tern Files makes a folder named after the archive, so nothing gets scattered. A name that is taken gets “(2)”.
  • Extract to “Name\” – always into a new folder named after the archive.
  • Extract to … – into a folder you choose. Inside an archive this takes the selected entries, or the folder you are looking at.

You can also take entries out like files: copy them with Ctrl+C and paste them in a folder, drag them into another folder or pane, or press F5 in two-pane mode.

Extracting runs as a job in the transfer queue: you see the progress, can pause it, and existing files lead to the usual question. Afterwards it is in the history, and Ctrl+Z removes the extracted files again. Before it starts, Tern Files checks the free space and stops early enough that the drive never runs completely full.

Password-protected archives

When an archive or an entry in it is encrypted, Tern Files asks for the password: Password for “…”.

  1. Type the password. Show lets you check what you typed.
  2. Click Open. If it says That password is not right. Please try again., check upper and lower case and try again.

The password is only kept in memory until you close the archive – it is never saved. When you open the archive again, Tern Files asks again. In the preview, encrypted entries are marked Encrypted.

If you extract without a valid password, the other files are extracted and you get the message No valid password for … – the encrypted files were not extracted.

Edit ZIP files

ZIP files can be changed right where they are – no unpacking and packing again. Inside a ZIP:

  • New folder: Ctrl+Shift+N.
  • Rename: F2.
  • Remove from archive: Del or the entry of the same name in the context menu.
  • Add files: paste them with Ctrl+V, drop them onto the list, or press F5 in the other pane to copy them into the ZIP.
  • Move out: cut with Ctrl+X and paste elsewhere, or press F6 in two-pane mode – the entries are extracted and then removed from the ZIP.

While Tern Files writes, the archive shows Writing the archive … and is read-only for that moment. It writes a new ZIP next to the old one, checks it and only then swaps the two. The old version goes to the Recycle Bin first, so nothing is lost. If there is no Recycle Bin there, or the old version is too large for it, Tern Files asks Keep the old archive? – you can keep it under a new name or replace it for good.

Every change is in the history, for example In Photos.zip: 3 added. Ctrl+Z brings back the archive exactly as it was.

Only ZIP files can be edited. Which archives stay read-only, and why, is explained under Read-only archives.

Changed files back into the archive

Opened a document from a ZIP, changed it and saved it? Tern Files notices and asks above the list: “…” was changed. Save it to the archive?

  • Save to archive – puts the changed file into the ZIP. Like every edit, this is in the history and can be undone.
  • Discard – the archive stays as it was, the change is dropped.
  • Later – hides the bar; Tern Files asks again next time. The changed file stays in the cache meanwhile.

If you are working in another program, a Windows notification Save to archive? appears; Show takes you to the bar. If the archive can't be edited – a 7z file, for example – you get Save as a copy next to the archive and Save changed copy as … instead. And if the archive itself was changed in the meantime, Tern Files tells you so before anything is overwritten.

Read-only archives

You can open, preview and extract every supported archive. Editing works for ZIP files only. An archive you can't change shows the chip Read-only; hover over it to see why:

  • Only ZIP files can be edited. – 7z, RAR and TAR files.
  • The archive contains encrypted entries.
  • Split archives can only be read. – archives in several parts, such as .7z.001.
  • Archives inside archives can only be read.
  • An entry uses a compression method that can only be read.
  • The archive is only online. or The archive is in a place that can't be written to.

Commands that would change such an archive stay dimmed in the menu and in the command palette, with the reason The archive is read-only. Extract the files, change them and pack them again if you need to.

Safe unpacking

Archives from the internet can be broken or even built to cause harm. Tern Files checks every entry before it writes anything:

  • Nothing outside the target folder – entries whose paths would lead out of the target folder are left out. Links inside archives are skipped, and names Windows doesn't allow are adjusted; you get a short note about both.
  • Zip bombs – if an archive would unpack to an unusual multiple of its size, Tern Files stops and asks: Unusually strong compression. Only Unpack anyway goes on.
  • Free space – extracting stops before the drive is full: Extracting stopped so that at least … stays free on the drive.
  • Programs – opening a program from an archive always asks first (see Look inside).
  • Mark of the web – files from downloaded archives keep the internet mark when they are opened or extracted.

A damaged archive shows Archive damaged. Show readable entries anyway lists everything that can still be read, with the note Archive damaged – showing the entries that could be read. If a part of a split archive is missing, Tern Files names it: A part of the archive is missing: …

The archive cache

Entries you preview, open or drag are unpacked into a cache in the data folder of Tern Files. It tidies itself: at every start, files older than 7 days are removed, and the cache stays below 2 GB.

Under Settings › Safety & history the row Archive cache shows its size, for example Archive cache: 120 MB. Clear empties it at once. Files that are still open in a program, or that you changed and haven't saved to their archive yet, stay – Tern Files tells you how many and lets you save the changed ones elsewhere with Save as ….