How to set a shortcut for packing files so that it will pack file to the target panel ?

English support forum

Moderators: Hacker, petermad, Stefan2, white

Post Reply
ziyan chen
Junior Member
Junior Member
Posts: 8
Joined: 2019-09-16, 07:35 UTC
Location: Xiamen, China

How to set a shortcut for packing files so that it will pack file to the target panel ?

Post by *ziyan chen »

Hi

I'm trying to make C+F5=cm_packfile , but when I press these keys TC just packing the files to the original path .
I check out the help manual and it says assign keys to cm_packfile will make it pack to the same directory .

Is it possible to make Total commander pack file to the target directory with other key bindings ?
User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Re: How to set a shortcut for packing files so that it will pack file to the target panel ?

Post by *Gral »

There is no need to configure anything - just use default key Alt+F5
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to set a shortcut for packing files so that it will pack file to the target panel ?

Post by *petermad »

2ziyan chen
The recommended way is to assign these two shortcuts
CA+F5=cm_PackFiles
CAS+F5=cm_PackFiles

Then
Alt+F5 copies files to the archive in the target panel (default)
Shift+Alt+F5 moves files to the archive in the target panel (default)
Ctrl+Alt+F5 copies files to the archive in the source panel
Ctrl+Alt+Shift+F5 moves files to the archive in the source panel

the behavior of Ctrl when assigned to cm_PackFiles is hardcoded into TC to pack to source dir, no matter what other keys that are assigned with it.

Ctrl+F5 is by default used to Sort the files by Date. If you insist on changing that, you can use C+F5=cm_CopyToArchive to pack to target dir (requires TC 10.50 or newer).
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
ziyan chen
Junior Member
Junior Member
Posts: 8
Joined: 2019-09-16, 07:35 UTC
Location: Xiamen, China

Re: How to set a shortcut for packing files so that it will pack file to the target panel ?

Post by *ziyan chen »

I see .. my original intention is to assign Alt to any command that is corresponded with " view " such as the order , thumbnails , quickview , folder tree , etc .

I tried to define my own command :

[em_PackFilesTargetPanel]
cmd=cm_PackFiles
param=/T="%T%N.zip"

but obviously it does not work properly when I choose "7z" . How can I modify my command ?
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to set a shortcut for packing files so that it will pack file to the target panel ?

Post by *petermad »

2ziyan chen

cm_PackFiles packs to the target panel by default, so you don't need the /T="%T%N.zip" unless you assign em_PackFilesTargetPane to a shortcut that use Ctrl.

So use C+F5=cm_CopyToArchive instead if you want Ctrl as the modifier key.

my original intention is to assign Alt to any command that is corresponded with " view "
Have you noticed that by default almost all commands that has to do with the view starts with Ctrl - why change that?
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
ziyan chen
Junior Member
Junior Member
Posts: 8
Joined: 2019-09-16, 07:35 UTC
Location: Xiamen, China

Re: How to set a shortcut for packing files so that it will pack file to the target panel ?

Post by *ziyan chen »

Very appreciate your reply . BTW I think I successfully define the em_PackFilesTargetPanel command :

Code: Select all

[em_PackFilesTargetPanel]
cmd=cm_PackFiles 
param=/T="%T."
button=
menu=Packing files to the target panel
ziyan chen
Junior Member
Junior Member
Posts: 8
Joined: 2019-09-16, 07:35 UTC
Location: Xiamen, China

Re: How to set a shortcut for packing files so that it will pack file to the target panel ?

Post by *ziyan chen »

You are right ... I didn't notice that
petermad wrote: 2023-11-05, 01:13 UTC 2ziyan chen

cm_PackFiles packs to the target panel by default, so you don't need the /T="%T%N.zip" unless you assign em_PackFilesTargetPane to a shortcut that use Ctrl.

So use C+F5=cm_CopyToArchive instead if you want Ctrl as the modifier key.

my original intention is to assign Alt to any command that is corresponded with " view "
Have you noticed that by default almost all commands that has to do with the view starts with Ctrl - why change that?
User avatar
petermad
Power Member
Power Member
Posts: 16027
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: How to set a shortcut for packing files so that it will pack file to the target panel ?

Post by *petermad »

2ziyan chen
param=/T="%T."
That will alway open the "Pack files" dialog in zip mode. cm_CopyToArchive will open the dialog with the last use packer chosen
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
ziyan chen
Junior Member
Junior Member
Posts: 8
Joined: 2019-09-16, 07:35 UTC
Location: Xiamen, China

Re: How to set a shortcut for packing files so that it will pack file to the target panel ?

Post by *ziyan chen »

That's better than my original solution .
petermad wrote: 2023-11-05, 01:26 UTC 2ziyan chen
param=/T="%T."
That will alway open the "Pack files" dialog in zip mode. cm_CopyToArchive will open the dialog with the last use packer chosen
Post Reply