[XYScript] 7-ZipXY: Portable Extraction & Archiving Using 7-Zip

Discuss and share scripts and script files...
Post Reply
WirlyWirly
Posts: 259
Joined: 21 Oct 2020 23:33
Location: Win 10 @ 100% (3440x1440)

[XYScript] 7-ZipXY: Portable Extraction & Archiving Using 7-Zip

Post by WirlyWirly »

7-ZipXY
2025-10-06_14-36-27.webp
2025-10-06_14-36-27.webp (8.79 KiB) Viewed 2083 times
Image

Image

Introduction
This script contains the most commonly used 7-Zip commands, normally found in the right-click menu after installation. The only difference is that they've been re-written to be used portably by XY, so no relying on the host to have 7z options in their registry. In addition, there are a few other unique commands that integrate nicely with an XY workflow...

Code: Select all

Extract to "*\": Extract each selected archive into its own folder
Extract here: Extract each selected archive into the current folder
-
Extract to "*\" in other pane: Extract each selected archive into its own folder in the inactive pane
Extract to other pane: Extract each selected archive into the inactive pane
-
Extract to "*\" in real folder: Extract each selected archive into its own folder relative to the archive's absolute path, useful when searching across a tree structure for archives located in various folders
Extract to real folder: Extract each selected archive into the same folder as the archive's absolute path, useful when searching across a tree structure for archives located in various folders
-
Create .7z(s): Quickly create a separate .7z for each selected list item
Create .zip(s): Quickly create a separate .zip for each selected list item
Create .cbz(s): Quickly create a separate .cbz for each selected list item
-
Add to Archive...: Create a single archive out of the selected list item(s) using the full GUI options
Included with the script you'll find the folder 7-Zip64 (taken directly from 7-ZipPortable), which contains the file 7zG.exe. This is the executable that will extract/create archives while also generating the familiar GUI screens. I've also included a 7-Zip icon, if you want to spice up your CFI/Toolbar... It's snazzy!

Here's the link to the documentation if you'd like to add your own functionality.

Installation
  • Download and extract the attached archive.
  • Move the folder '7-ZipXY' to your <xyscripts> folder, or anywhere else on your system.
  • Load the script using your preferred approach (Toolbar, hotkey, from another script, etc)
    Command = ::Load "<xyscripts>\7-ZipXY\7-ZipXY.xys";
Download
7-ZipXY.zip
v2.0
(2.32 MiB) Downloaded 49 times
Previous Versions
7-ZipXY.7z
v1.0
(1.48 MiB) Downloaded 414 times
Last edited by WirlyWirly on 01 May 2022 18:18, edited 7 times in total.

Horst
Posts: 1329
Joined: 24 Jan 2021 12:27
Location: Germany

Re: [XYScript] 7-ZipXY: The Right-Click Options

Post by Horst »

I'm using my own 7z buttons but let me suggest one option for your script
which for me is the native way using a 2 pane mode.
Extract into the current other pane folder.
Windows 11 Home, Version 25H2 (OS Build 26200.7019)
Portable x64 XYplorer (Actual version, including betas)
Display settings 1920 x 1080 Scale 100%
Everything 1.5.0.1400a (x64), Everything Toolbar 2.1.0, Listary Pro 6.3.6.99

WirlyWirly
Posts: 259
Joined: 21 Oct 2020 23:33
Location: Win 10 @ 100% (3440x1440)

Re: [XYScript] 7-ZipXY: The Right-Click Options

Post by WirlyWirly »

Horst wrote: 01 May 2022 14:43 I'm using my own 7z buttons but let me suggest one option for your script
which for me is the native way using a 2 pane mode.
Extract into the current other pane folder.

I use dual-panes myself but for some reason this had never even crossed my mind :veryconfused:

Easy addition and could prove useful, added it to the script :tup:

kwanice
Posts: 57
Joined: 07 Aug 2022 13:41

Re: [XYScript] 7-ZipXY: The Right-Click Options

Post by kwanice »

wow i saw ur script in your signature 😊 looks great, im a beginner user of Xy and i feel i really need to dig in to see all the gems this app can do !

thanks !
(OS: W11 24H2 Pro OS build 26100.4946 - XY: 27.90.00.25 (64b) - Display: 2880 x 1920 @ 200% - Surface Pro 11 arm64)

WirlyWirly
Posts: 259
Joined: 21 Oct 2020 23:33
Location: Win 10 @ 100% (3440x1440)

Re: [XYScript] 7-ZipXY: The Right-Click Options

Post by WirlyWirly »

Pushed v2.0, which adds a handful of new commands and fixes one that wasn't working right. I also made it more portable than before, so now it's not hard-coded to look for the script's folder in the <xyscripts> directory.

sparks
Posts: 30
Joined: 06 Jan 2022 01:33
Location: Win10, ver 22H2, 1920 x 1080 @100%

Re: [XYScript] 7-ZipXY: Portable Extraction & Archiving Using 7-Zip

Post by sparks »

Wow, what a cool useful script.. Thanks for sharing this, and the portable tweak you added. :appl:

There are so many 'Hot Tips' hidden away in this forum, I wish there was a future way to 'flag' them somehow...
A great one was in this post from 2022, from 'Horst', ..asking for: 'Extract into the current other pane folder',
-- Which is such a great user tip for productivity! ...'WirlyWirly' bubbled all this into 2025 with his new little 'tweaks' to the code.

Many Thanks.

xqzvv
Posts: 1
Joined: 27 Oct 2025 19:12

Re: [XYScript] 7-ZipXY: Portable Extraction & Archiving Using 7-Zip

Post by xqzvv »

add CRC SHA

Code: Select all

CRC SHA|popupmenu|
  CRC-32|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h "$item"), 2:=2; };|
  CRC-64|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrcCRC64 "$item"), 2:=2; };|
  XXH64|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrcXXH64 "$item"), 2:=2; };|
  MD5|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrcMD5 "$item"), 2:=2; };|
  SHA-1|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrcSHA1 "$item"), 2:=2; };|
  SHA-256|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrcSHA256 "$item"), 2:=2; };|
  SHA-384|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrcSHA384 "$item"), 2:=2; };|
  SHA-512|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrcSHA512 "$item"), 2:=2; };|
  SHA3-256|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrcSHA3-256 "$item"), 2:=2; };|
  BLAKE2sp|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrcBLAKE2sp "$item"), 2:=2; };|
  -
  *|foreach($item, "<selitems ::>", "::") { run lax("$sevenZIP" h -scrc* "$item"), 2:=2; };| 
Last edited by xqzvv on 27 Oct 2025 19:19, edited 4 times in total.

Post Reply