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.
Also, when Opus starts, the command will remove any leftover temp file links it created.
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
IMPORTANT: Needs at least DOpus v13.16.1
Download the file below. Then go to Settings / Scripts (or run Prefs SCRIPTINSTALL
) and select the downloaded file.
Options
In the Script Management window, select ZipIt
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. | |
FILES | /M | Specify the files the command will act upon. |
Notes / Technical Stuff
-
If the file is located in the same disk as
/temp
directory, 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.
-
When uninstalling the script or when Opus starts, the command will remove any leftover temp file links it created.
Changelog
- General code improvements.
- You can now open files as ZIP even if they're nested inside other ZIPs.
- The command now supports piping with other commands, e.g., with this one.
- New argument:
FILES
, to specify which files to use. - The script now cleans up leftover file links it created when Opus starts.
v1.0.0 (Dec 28, 2024) : Initial release