Page 1 of 1

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

Posted: 01 May 2022 04:56
by WirlyWirly
7-ZipXY
2025-10-06_14-36-27.webp
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
Previous Versions
7-ZipXY.7z

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

Posted: 01 May 2022 14:43
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.

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

Posted: 01 May 2022 18:14
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:

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

Posted: 13 Jun 2025 07:11
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 !

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

Posted: 06 Oct 2025 23:16
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.

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

Posted: 07 Oct 2025 17:19
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.

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

Posted: 27 Oct 2025 19:14
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; };|