Unpack from nested archive to the current directory

Here you can propose new features, make suggestions etc.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
browny
Senior Member
Senior Member
Posts: 287
Joined: 2007-09-10, 13:19 UTC

Unpack from nested archive to the current directory

Post by *browny »

Let's use tcmd922ax32_64.exe as an example.
This file could be treated as an arvhive with another enclosed archive INSTALL.CAB.

Enter into the installer using Ctrl+PgDn, select INSTALL.CAB and press F5, then type dot in path of the Unpack files dialog.
That should unpack the selected file into the current directory (where tcmd922ax32_64.exe is).

But if dot was typed for files inside INSTALL.CAB, then these files would be unpacked to the TC's temporary directory.
Could it be possible to substitute dot with the current directory instead of the temporary?
Last edited by browny on 2019-12-20, 21:13 UTC, edited 1 time in total.
User avatar
Phred
Senior Member
Senior Member
Posts: 375
Joined: 2009-06-16, 15:24 UTC
Location: SEAu

Re: Unpack from enclosed archive to the current directory

Post by *Phred »

Keep in mind, browny, that dot (".") represents the current directory, as you say, but, in the example you give, the current directory is the insides of the packed exe itself.
What you're really after is the 'parent' of the exe's contents, which is the directory 'above' those contents, i.e. the directory in which the exe file (not its contents) lies.

By your saying that you want the files in the 'current directory', where they already are, you've discombobulated the unpacker and it's put the extractions in the only place it can resolve your contradiction - ...\Temp\.

Tested "..", and it works.
Voilà!
Regards, PhredE
Licence holder since 1999
Awaiting a $D donors-token for the title-bar so we can display that we have donated further.
browny
Senior Member
Senior Member
Posts: 287
Joined: 2007-09-10, 13:19 UTC

Re: Unpack from enclosed archive to the current directory

Post by *browny »

Phred wrote: 2019-12-20, 15:02 UTC Keep in mind, browny, that dot (".") represents the current directory, as you say, but, in the example you give, the current directory is the insides of the packed exe itself.
Strictly speaking, the current directory is set with SetCurrentDirectory() Windows API call. There is no current directory inside the archive that could be set this way.
Phred wrote: 2019-12-20, 15:02 UTC What you're really after is the 'parent' of the exe's contents, which is the directory 'above' those contents, i.e. the directory in which the exe file (not its contents) lies.
TC mostly keeps track of its current directory. If you go inside nested archives, and then trace back your steps with Ctrl+PgUp, usually you will not end up in temporary directory, but will be returned where the original archive file was (usually - because there were bugs).
Phred wrote: 2019-12-20, 15:02 UTC By your saying that you want the files in the 'current directory', where they already are, you've discombobulated the unpacker and it's put the extractions in the only place it can resolve your contradiction - ...\Temp\.
Unpacker does what TC orders it to do. The idea was in the last phrase - to replace the directory where temporary archives are with the directory of the original archive.
Phred wrote: 2019-12-20, 15:02 UTCTested "..", and it works.
Voilà!
Not really; file was still in the temporary directory.
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Unpack from nested archive to the current directory

Post by *petermad »

Not really; file was still in the temporary directory.
That is what I experience too.


2Phred
browny is inside the INSTALL.CAB, when he press F5...
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Phred
Senior Member
Senior Member
Posts: 375
Joined: 2009-06-16, 15:24 UTC
Location: SEAu

Re: Unpack from nested archive to the current directory

Post by *Phred »

Thank you for the technical detail, petermad, and, yes, I see now that browny was inside INSTALL.CAB. Another level deep (just like Inception, dreaming a dream inside a dream ..six levels, I believe; loosely based on The Thirteenth Floor, largely based on Daniel F Galouye's Counterfeit World).

Nevertheless, I think the principle in my description remains: be rightly cognizant of 'current', something that could be solved easily by a simple extraction. There's only so much we should wish for. If not, how many levels deep? Even Mal didn't know whether or not she was living in the 'top reality'.

My test did work, such, though, where it was.
Regards, PhredE
Licence holder since 1999
Awaiting a $D donors-token for the title-bar so we can display that we have donated further.
User avatar
petermad
Power Member
Power Member
Posts: 14741
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Unpack from nested archive to the current directory

Post by *petermad »

My test did work, such, though, where it was.
Using one dot, or just a blank field also works in the first level of the archive.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply