User Command to unpack files?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

User Command to unpack files?

Post by *robinsiebler »

I know I can use PowerPro to automate unpacking files (I wrote a script that does just that). However, I wanted to know if it is possible to write a User Command to do the same thing, for instance unpack the currently highlighted file into a subdir in the opposite pane.
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
User avatar
petermad
Power Member
Power Member
Posts: 16157
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

You can use the command cm_UnpackFiles on the archive file.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
robinsiebler
Senior Member
Senior Member
Posts: 460
Joined: 2003-03-05, 21:04 UTC

Post by *robinsiebler »

Yes, but that only brings up the same dialog I would get if I pressed Alt+F9. It doesn't allow me to specify any parameters. I frequently want to do things like unpack the files into a subdir of the opposite pane, unpack into a subdir in the current pane.
Robin L. Siebler
Personal License #13949
------------------------------
"Bother", said Pooh, as he deleted Windows
Hurdet
Power Member
Power Member
Posts: 716
Joined: 2003-05-10, 18:02 UTC

Post by *Hurdet »

I would also like to know how to add extract to subdir as default option in the cm_UnpackFiles.
User avatar
MVV
Power Member
Power Member
Posts: 8713
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

robinsiebler
You can't add custom parameters. The only thing you can is to use external packer with parameters (e.g. 7-Zip supports many formats, and it may be controlled via command line).

robinsiebler, Hurdet
If you wish to have option 'unpack to separate dir' checked on dialog opening, you should read 4.b section of TOTALCMD.chm file:
UnZIPSeparateSubdirs=-1

Saves the state of the option "Unpack each archive to separate subdir":
0: Option disabled, changes will be remembered
1: Option enabled, changes will be remembered
-1: Option disabled, changes will NOT be remembered (default)
-2: Option enabled, changes will NOT be remembered
-3: Like -2, but only when more than one archive is selected
So, just add parameter UnZIPSeparateSubdirs=-2 to section [Packer]. :)
Post Reply