ZipIt : Open selected files as zips

ZipIt is a script add-in command for Directory Opus, that allows users to seemingly opens selected files, if possible, as if they were zips.

How this works:

The command creates a temporary link (hardlink or softlink) to the file but with a .zip extension.
Then, that file can be opened by Opus as a normal zip.
The command monitors the open tabs to remove the temporary files as soon as they are closed.

:warning: IMPORTANT: READ BEFORE PROCEED

This script is provided "as is" and without warranty of any kind or whatsoever.
It has been made during my spare time and has not been extensively tested, so it is presented as a testing version.
The user assumes full responsibility for its use and understands that the author is not responsible for possible failures or loss of data.
Kind remind that this is a work in progress, so expect bugs.
Any feedback on possible improvements or bugs is welcome.

How to Install

:warning: IMPORTANT: Needs at least DOpus v13.12
Download the file below. Then go to Settings / Scripts (or run Prefs SCRIPTINSTALL) and select the downloaded file.

v1.0.0 : CommandZipIt.opusscriptinstall

Options

In the Script Management window, select VT and click in the Edit button.

  • log level : Logging level to be displayed.
    • OFF to show only errors.
    • DEBUG to show all messages.
    • STANDARD to show only the most relevant information.
    • WARNING to show messages that needs your attention.
  • relative temp path : Relative path to the folder where temporary links will be stored. Note that this value is appended to each root disk.
    E.g. config_relative_path = my_temp_folder\temp_hardlinks will result in the temporary path being x:\my_temp_folder\temp_hardlinks for files on x:\ used with this command.
  • config_valid_exts : List of extensions that will be considered by the command. Leave empty to use all extensions.

Usage

ZipIt supports the following arguments:

Command Arguments

ARGUMENT TYPE VALUE DESCRIPTION
CONFIRM /S Show a confirmation before open any file.
DUAL /S Open the zips in a new tab in dual mode.

Notes / Technical Stuff

  • If the file is located in the same disk as /temp, a hardlink will be created in that folder.

  • If the file is on a non NTFS disk, a softlink will be created in /temp.

  • Otherwise, a hardlink will be created at the root of the disk in the relative folder specified in relative temp path or a folder named .DO_aszip_temp by default.

  • Whenever possible, the command automatically removes these temporary links, except in cases such as when a lister with the pseudo-zips still open is closed.

Changelog

v1.0.0 (Dec 28, 2024) : Initial release
CommandZipIt.opusscriptinstall (3.9 KB)

3 Likes