7-ade

Version 1.2, 11th July 2021
https://telcontar.net/Software/7-ade/

Contents

  1. Summary
  2. Getting started
  3. Configuration
    1. Field types
    2. [7-ade] section
    3. Rule definitions
      1. General
      2. Filter parameters
      3. Actions
    4. [Defaults] section
    5. Version 1.0 rules method
  4. Changelog
  5. Development
  6. Licence
  7. Name

Summary

7-ade is an archive expander for Microsoft Windows built around 7-Zip. 7-ade provides double-click expansion of archives in the manner of the venerable StuffIt Expander for Macintosh:

7-ade examines the archive in question, decides on an appropriate course of action for expansion, and makes a request of the 7-Zip graphical expansion utility (7zG.exe) to expand the archive.

The following additional features are provided:

Tarball file extensions recognised at the time of writing are: .tar.gz and .tgz (gzip); .tar.bzip2, .tar.bz2 and .tbz2 (bzip2); tar.bz and .tbz (bzip); and .txz and .tar.xz (xz). This is based on 7-Zip’s list of potential file associations. RPM (.rpm) files are also fully unpacked, unless the inner file is compressed with Zstandard, which 7-Zip does not recognise.

7-Zip needs to be installed on the computer for 7-ade to function. If 7-Zip is already installed before installing 7-ade, then “View in 7-Zip” is added to the context menu of each archive type for convenience.

Getting started

This part is simple. Once the program is installed, simply double-click archives. Windows 8 and 10 will prompt you to switch over to 7-ade on a per-file-type basis. Windows 7 users need to associate the file types manually; it should be possible using the Set your default programs control panel, but Windows 10, 7-ade does not always appear.

The program should work in Windows XP, but no provisions are made for XP’s file types system. Please let Windows XP rest in peace.

Configuration

Most users will simply use the program as-is: double-click archives to expand them. Chances are you can simply stop reading here. However, I have a particular use case (backup reports delivered as HTML files in zip files) where I wanted files of a particular name—found in a particular location (Outlook’s temporary directory)—to be expanded into a specific directory with overwrite enabled. As such, I chose to make this facility generic in case someone else finds it useful. Additional rule options have been added per user requests.

7-ade is configured using %APPDATA%\Telcontar\7-ade.ini. This file is used if it exists, and is not required. The section and parameter names are not case sensitive. If non-ASCII text is to be used in the file, then it must be in UTF-16 format (not UTF-8) due to how Windows reads INI files.

Example contents are as follows:

[Rules\foo]
Name begins=foo
Path is=C:\Users\McFoo\Downloads
Overwrite=yes

[Rules\bar]
Name begins=megacorp-batch-
Target path=\\BAZ\megacorp\batches\
Recycle archive=yes

Field types

string
text; for non-ASCII values, the whole file must be UTF-16 format
boolean
“1”, “true” and “yes” are considered true, regardless of case; all other values are considered false
enum
the value must be one of the choices specified (case-insensitive)

[7-ade] section

The [7-ade] section defines global settings for the program.

Rules
string: comma separated list of INI section names that contain rule definitions, listed in order of rule priority (replaced with the version 1.1 method)
Debug
boolean: enable debug output that can be viewed in DebugView or equivalent

Rule definitions

Rules allow the behaviour of 7-ade and 7-Zip to be made conditional upon the name and path of archives. One or more rules can be defined; 7-ade examines the applicability of rules to an archive in the order that the rules are defined (version 1.1 method) or the order that they are listed in the Rules parameter of the [7-ade] section (version 1.0 method). The first rule to match is applied, and the remainder of the rules are ignored even if they would have matched. If no rules match, and a [Defaults] section exists, then any actions in this section are applied.

From version 1.1, rules can be defined as INI sections whose names begin “Rules\”, as shown in the example above. The older version 1.0 format is described later, for reference.

From version 1.2 onwards, rules may inherit their configuration from the defaults.

General

Inherit
boolean: inherit all the configuration from the [Defaults] section (new in 1.2); the Inherited setting of [Defaults] is applied if Inherit is not set, but if Inherit is set on a rule, this takes precedence
Inherited
boolean: applicable only to the [Defaults] ruleset, this setting indicates whether the default behaviour should be inherited by rules (unless overridden by individual rules); inheritance is disabled by default to retain compatibility with earlier versions (new in 1.2)

Filter parameters

Name is
string: The filename of the archive (including extension) equals this text
Name begins
string: The filename of the archive (including extension) begins with this text
Name ends
string: The filename of the archive (including extension) ends with this text
Name contains
string: The filename of the archive (including extension) contains this text
Path is
string: The path of the folder containing the archive equals this text
Path begins
string: The path of the folder containing the archive begins with this text
Path contains
string: The path of the folder containing the archive contains this text

Actions

Overwrite
boolean: instruct 7-Zip to overwrite automatically; also, if the enclosing folder for expansion exists, it will be re-used
Target path
string: target location to expand the archive; if an enclosing folder is needed, it will be placed inside this location
Recycle archive
boolean: if archive expansion is successful, move the source archive file into the Recycle Bin (if the archive is too large to be recycled, or is on a volume without Recycle Bin support, this will revert to deletion, but Windows should prompt to confirm deletion)
Delete archive
string: if archive expansion is successful, delete the source archive file (if recycle and delete are both set, recycle takes precedence)
Launch output
enum: launch the top-level contents of the archive following expansion
any
If the output from the archive is a single file, open it; if the output was enclosed in a folder, then open the folder
all
The same as “any”
files
If the output from the archive is a single file, open it; otherwise, take no action
Show
enum: show the extracted archive contents in Explorer following expansion
enclosing
Open the folder containing the extracted output; where the archive’s contents were enclosed in a folder, the parent of that folder is opened
output
If the output from the archive is a single file, show the enclosing folder window in Explorer and highlight the output; the archive’s contents were enclosed in a folder, that folder itself is opened
Update modified time
boolean: following archive expansion, update the modification time of the outermost item instead of preserving the date stored within the archive; for single-file archives the outermost item will be the archive’s only item, while otherwise the outermost item will be the enclosing folder

[Defaults] section

The [Defaults] section is used to define the behaviour of the program if no rules match and to set global defaults that apply regardless of rule. Only the action parameters from rule definitions are meaningful here. By default, all values in this section are ignored when a rule is applied. From version 1.2, the [Defaults] section can be set to be inherited by other rules. Inheritance is disabled by default to ensure that version 1.2 does not introduce unwanted changes in behaviour. Inheritance from the [Defaults] section can also be enabled or disabled on a rule-by-rule basis. A rule with inheritance disabled and no actions functions as an exclusion from the defaults.

Version 1.0 rules method

The original rules method works as follows:

[7-ade]
Rules=foo,bar

[foo]
Name begins=foo
Path is=C:\Users\McFoo\Downloads
Overwrite=yes

[bar]
Name begins=megacorp-batch-
Target path=\\BAZ\megacorp\batches\
Recycle archive=yes

Specifically, the rules are normal INI sections, and the active rules must be specified under the [7-ade] section. This method remains available.

Changelog

1.2

2021-07-11

1.1.1

2020-08-26

This version just corrects and expands on the file associations.

1.1

2020-08-11

1.0

Initial version, 2016-07-31.

Development

7-ade is an open source application programmed in AutoHotkey. It requires the revised ahk2exe for build directives. The installer is built using Inno Setup. All graphics were created using Inkscape.

A copy of all the development files is available for download.

Licence

7-ade is copyright 2016–2020 Daniel Beardsmore. The 7-ade application (“program”) and source code are made available under the zlib license, the terms of which are included in a separate document. The program may be used without restriction free of charge.

Name

The name of my original 7-Zip wrapper (written in Perl and supporting only zip files) was “7-Up”. The name change to “7-ade” allowed the program to have a unique identity, and to allow me to restart the version numbering from 1.0, as 7-ade is the program that 7-Up was always meant to be but never was.

“7-ade” can be thought of as either “Sevenade” (an own-brand soft drink) or as “Seven-aid” (artificial sweetener for 7-Zip).