7zip archive folder format

Given:

  • 7z plugin is enabled
  • Filetype 7z is assigned to group archive
  • In filetypes in section of file type groups -> archives -> contains 7z extension among many others
  • There is a folder format defined for all archives which adds compression ratio column to the regular columns set
  • Format lock (padlock) is disabled in lister

Perform the following actions:

  • Create new archive folder in format zip "A.zip"
  • Create new archive folder in format 7z "B.7z"
  • Drag&drop some exe file into both of archives (copy it there)

Then:

  • When entering "A.zip" lister shows ratio column respecting the settings
  • When going level up additional column disappears as we're no longer in any archive
  • When entering "B.7z" lister shows no additional columns ignoring the format settings

Those extra columns are specific to each archive handler. The zip and 7z formats have their own ratio columns.

You could use wildcard formats matching *.zip and *.7z to get separate formats/columns for each archive type.

I cannot find a way to do this. In dialog of defining new wildcard folder format those 7z-related columns are not available on the list.

You could combine the two with an Evaluator column, e.g.:

XML
<?xml version="1.0"?>
<evalcolumn align="1" attrrefresh="no" autorefresh="no" customgrouping="no" foldertype="all" keyword="CompRatio" maxstars="5" namerefresh="no" reversesort="no" title="CompRatio" type="10">IsSet(&quot;opus7zip:ratio&quot;) ? Val(&quot;opus7zip:ratio&quot;) : (IsSet(&quot;zip:compratio&quot;) ? Val(&quot;zip:compratio&quot;) : 0)</evalcolumn>
Set COLUMNSTOGGLE="eval:CompRatio(!,a,0)"

You'll find the column in the format dialog:

1 Like

How did you know what were the names of those columns for evaluator code?

They are listed in the docs:

Keywords for Columns

A faster way that also removes the guesswork is to use ClipCopy after adding the columns to the file display:

ClipCopy COLUMNS
1 Like