Extractor - Extract, cleanup and delete archives

Discuss and share scripts and script files...
klownboy
Posts: 4052
Joined: 28 Feb 2012 19:27

Re: Extractor - Extract, cleanup and delete archives

Post by klownboy »

Hey highend, I just ran extractor a couple of times on one archive and I suppose the delete archive window is a little big when only one or two files are displayed, but usually I have "DeleteArchives=0" since I still tend to hold on to the archives. Though in this day and age, it's so easy to get the archives again on-line I suppose that philosophy is a bit outdated. I'm not sure I'd bother to script the resize unless you can do it without too much hazzle. By the way, I've been putting extractor through the paces and haven't encountered any issues. Thanks again.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

PortablesFan
Posts: 2
Joined: 19 Mar 2015 21:38

Re: Extractor - Extract, cleanup and delete archives

Post by PortablesFan »

Hello highend,
I'm trying to configure Extractor for portable use, and am getting stuck at configuring relative paths.

The folder structure currently is:
Xyplorer
--Tools (added)
----BandiZip-portable
----Extractor

For a relative path, I have tried:
..\BandiZip-portable\Bandizip32.exe [should work if the path is parsed 'relative' to Extractor.exe]
.\Tools (added)\BandiZip-portable\Bandizip32.exe [should work if the path is parsed 'relative' to XYplorer.exe]

But neither does; in both cases I am prompted to locate the .exe file of BandiZip.

Before starting to mess with the XYplorer script, I tried to configure and test Extractor by dropping a single .zip file on it. In that situation, BandiZip was successfully called (using the first relative path above), though for some reason it didn't seem to use the BandiZip portable configuration I was expecting...

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Extractor - Extract, cleanup and delete archives

Post by highend »

Just use XY internal variables.

In your case: <xypath>
It automatically resolves to the path where xyplorer.exe is in.

E.g.

Code: Select all

<xypath>\Tools (added)\BandiZip-portable\Bandizip32.exe
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

PortablesFan
Posts: 2
Joined: 19 Mar 2015 21:38

Re: Extractor - Extract, cleanup and delete archives

Post by PortablesFan »

There may have been a miscommunication, I might have been unclear. I'm trying to figure out how to point Extractor to BandiZip portably, using a relative path. So, just to make sure we're on the same page: Right now [part of] my Extractor.ini is:

Code: Select all

[Bandizip]
AppFilePath=<xypath>\Tools (added)\BandiZip-portable\Bandizip32.exe
; .\Tools (added)\BandiZip-portable\Bandizip32.exe  didn't work
; ..\BandiZip-portable\Bandizip32.exe  didn't work
ExtractArgs1=/extract_autodest
Extensions=rar,zip,zipx,7z,001,cab,gz,img,iso,tar,tgz,wim
; "<AppFilePath>" <ExtractArgs1> "<destination folder>" "<archive1>" ... "<archiveX>"
; Not supported: ace,vhd
I'd be pretty surprised if you really wanted me to use an XYplorer variable in Extractor.ini, but I tried it, and Extractor still asks me to locate the executable. "Extraction application not found, aborted!"

Thanks for your help, and your program!

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Extractor - Extract, cleanup and delete archives

Post by highend »

:)

I hadn't modified Extractor for a (rather) long time. Ofc it's silly to put XY variables into the .ini file (because they aren't recognized by my .ahk script). Although I could support them :) Nevertheless. Portable paths aren't supported atm but I'll add that feature in the next days ... done^^
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Extractor - Extract, cleanup and delete archives

Post by highend »

v0.9.4 added.

Relative paths for applications are now supported. From the first page:
Since v0.9.4 relative paths are supported (at least ".\" or (a combination of) "..\").
These paths are relative to the folder in which Extractor.exe is stored!

E.g.:
Extractor.exe may be placed in "D:\Tools\XYplorer\Tools\Extractor"
than:
AppFilePath=.\Winrar\Winrar.exe
Would resolve to "D:\Tools\XYplorer\Tools\Extractor\Winrar\Winrar.exe"

or
AppFilePath=..\..\Winrar\Winrar.exe
Would resolve to "D:\Tools\XYplorer\Winrar\Winrar.exe"
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Stef123

Re: Extractor - Extract, cleanup and delete archives

Post by Stef123 »

Thanks for making this great script portable. Been using it heavily the last few days. No better way to handle large amounts of archives, not even with other managers where I usually do most of my archiving tasks. It's way faster than with default XY except for slow usb sticks - their write speed becomes the bottleneck.

Suggestion: An option (ini -setting or otherwise) to unpack to the other pane (inactive or hidden). Because reading from external drives is often a lot faster than writing to them. Not to mention I wouldn't have to double-check if source drives have enough free space to hold the unpacked material.

Btw, is it safe to run a duplicate "extractor_2.exe" with a modified "extractor_2.ini" or do I risk corrupting extractor.ini along the way because it might be hardwired somewhere?

Thanks for this useful - and versatile - script.

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Extractor - Extract, cleanup and delete archives

Post by highend »

New update:
@Changelog:
v0.9.5:
* Added a new .ini option: DstInactivePane
If set to 1: Extract all archives to the inactive (or if dual pane is not active: hidden) pane!
If set to 0 (default): Extract to the base folder of the archive (old behavior)
New call: run """<path to Extractor.exe>"" ""<get SelectedItemsPathNames |>"" ""<get Path i>""";
Suggestion: An option (ini -setting or otherwise) to unpack to the other pane (inactive or hidden). Because reading from external drives is often a lot faster than writing to them. Not to mention I wouldn't have to double-check if source drives have enough free space to hold the unpacked material.
Done.

You need to invoke the extractor.exe with a new xy script call:

Code: Select all

run """<path to Extractor.exe>"" ""<get SelectedItemsPathNames |>"" ""<get Path i>""";
If you aren't interested in the new functionality, the old call is sufficient:

Code: Select all

run """<path to Extractor.exe>"" ""<get SelectedItemsPathNames |>""";
Btw, is it safe to run a duplicate "extractor_2.exe" with a modified "extractor_2.ini" or do I risk corrupting extractor.ini along the way because it might be hardwired somewhere?
The .ini file name is derived from the .exe name. So if you have a "extractor_2.exe" in the same folder as "extractor.exe" than you can (and have to) use a "extractor_2.ini" file
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Stef123

Re: Extractor - Extract, cleanup and delete archives

Post by Stef123 »

Wow, I mean WOW - the new version allows all kinds of destination paths - hardwired or variable-triggered, including <clipboard> and virtual sandbox drives. This is awesome. :appl: I added several run-commands to my context-menu for archives.

Small niggle - when you select one file only - Delete is ON - the final dialog won't bring up the single file to delete. No big deal, just wanted to mention it. If the dialog wouldn't pop up at all, you'd be left with the initial selection and just press DEL. But since the dialog does come up - empty-handed - you wonder whether it's still processing... if something will be listed eventually.... ?
highend wrote: The .ini file name is derived from the .exe name.
Great. :tup: I've modified four different ini-setups already. My other reason for asking has to do with my next big endeavor: I am rolling up my sleeves and firing up the blow-torch to weld your ahk upside-down, packing selected folders into zip-files. :ninja: :ugeek:

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Extractor - Extract, cleanup and delete archives

Post by highend »

Small niggle - when you select one file only - Delete is ON - the final dialog won't bring up the single file to delete. No big deal, just wanted to mention it. If the dialog wouldn't pop up at all, you'd be left with the initial selection and just press DEL. But since the dialog does come up - empty-handed - you wonder whether it's still processing... if something will be listed eventually.... ?
Can't reproduce. I select a single .zip file. Call extractor. It get's extracted and the Extractor.exe windows comes up with the file prechecked. Not an empty dialog. DeleteArchives=1. Need more input on this.
I am rolling up my sleeves and firing up the blow-torch to weld your ahk upside-down, packing selected folders into zip-files.
I'd say: easy task :biggrin:
Should I write another script called: Compactor?

Btw, thanks for the donation!
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Stef123

Re: Extractor - Extract, cleanup and delete archives

Post by Stef123 »

highend wrote:Can't reproduce. I select a single .zip file.... Need more input on this.
If you extract to the source path it works like it did before. But if you use the new "across pane" run-call, it won't.
highend wrote:
I am rolling up my sleeves and firing up the blow-torch to weld your ahk upside-down, packing selected folders into zip-files.
I'd say: easy task :biggrin:
Not missing the sarcasm here :wink: - and mind you - I am well aware this is WAY over my head. The only reason I dare to indulge in such grandiose self-delusions = most of it seems to happen in ahk, which I find muchos plenty zillions times easier than xys. No eeny-weeny miniscule minutiae to take care of. The problems I run into with ahk are usually "real" problems, lacking knowledge about appropriate functions etc, but never syntax issues.
highend wrote: Should I write another script called: Compactor?
Btw, thanks for the donation!
Small appreciation, micro-money into the tip jar. Not meant to bribe you. But hey, needless to say, I won't complain at all should you decide to go for the Compactor (good name) yourself. Maybe you could start with 7-Zip or Bandizip setups :P :mrgreen:

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Extractor - Extract, cleanup and delete archives

Post by highend »

If you extract to the source path it works like it did before. But if you use the new "across pane" run-call, it won't.
Ok, if the inactive pane points to a different pane than the active pane I can reproduce it. I have to rewrite a few things to get this right. Don't know if I'll have enough time tomorrow...
Not missing the sarcasm here
No sarcasm. It's mainly the same codebase that can be used. It's just editing no major reinventing everything. Can take a bit of time. Holiday on saturday for a week, work in between...
I won't complain at all should you decide to go for the Compactor (good name) yourself
Yeah, I'll do that. If you have a bit sparetime you could do me a favor and take a look at the necessary command line options (in the same way as they are used in the extractor.ini file) for all supported tools...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Stef123

Re: Extractor - Extract, cleanup and delete archives

Post by Stef123 »

Glad to hear. No rush, take your time.
I'll provide the command line options. I already have 7-zip in my private notes, Bandizip doesn't have their own parameters, afaik, they carry along 7-zip in their overhead. Will reserach the others.

I suggest we limit the optional parameters to 3 only:
Type
Compression method/ratio
optional password encryption (maybe not even needed, I don't use it)

Stef123

Re: Extractor - Extract, cleanup and delete archives

Post by Stef123 »

Tried sending you a PN with attachment. Nothing - I mean nothing - gets through. :blackstorm: Zip not allowed, rar not allowed, niether 7z, neither ini, neither txt. Can you believe it? I am not even allowed to mail you a plain text file? How crazy is that?

No more time to waste, giving it a last try here in the forum. Read Compactor.ini and Compactor.txt.
Thanks for taking on this projecct.
Attachments
Compactor.7z
(858.06 KiB) Downloaded 224 times

highend
Posts: 13033
Joined: 06 Feb 2011 00:33

Re: Extractor - Extract, cleanup and delete archives

Post by highend »

Thanks Stef123.

Yeah, the forum isn't the best when it comes to private messages :biggrin:

I'll work on it when I come back from my holidays...
One of my scripts helped you out? Please donate via Paypal or paypal_donate (at) stdmail (dot) de

Post Reply