How to make TC to pack a file into the same directory?
Moderators: Hacker, petermad, Stefan2, white
How to make TC to pack a file into the same directory?
When I use the Pack command, it always shows me c:\ as the default location.
I cannot find a way to compress a file into it's own location without typing in the full path in the compression dialogue window each time.
Am I missing something?
I cannot find a way to compress a file into it's own location without typing in the full path in the compression dialogue window each time.
Am I missing something?
Re: How to make TC to pack a file into the same directory?
UPD: Ok, I found that if I just delete the c:\ before the filename, it will save it into the same directory. So the question is more - how to make this a default?
Re: How to make TC to pack a file into the same directory?
Press the CTRL key and hold it down, then click on the button with command: cm_PackFilesSoom wrote: 2020-03-25, 15:55 UTC I cannot find a way to compress a file into it's own location without typing in the full path in the compression dialogue window each time.
Re: How to make TC to pack a file into the same directory?
How to pack to an archive into the same directory / panel?
Hold the CTRL key
while clicking at menu "Files > Pack..."
-or- together with F5
EDIT: oops
please see correction by petermad in post below.
HTH?
Hold the CTRL key
while clicking at menu "Files > Pack..."
-or- together with F5
EDIT: oops

HTH?

Re: How to make TC to pack a file into the same directory?
2Stefan2
If you also put this in the [Shortcuts] section:
then pressing Ctrl+Alt+Shift+F5 will move files to an archive in the current panel.
Alt+Shift+F5 always moves file to the archive - but in the opposite panel.
Ctrl+F5 sorts by date/time.
It is actually together with Alt+F5 so all together it is Ctrl+Alt+F5 - and you have to put this in the [Shortcuts] section of your wincmd.ini-or- together with F5
Code: Select all
CA+F5=cm_PackFiles
If you also put this in the [Shortcuts] section:
Code: Select all
CAS+F5=cm_PackFiles
Alt+Shift+F5 always moves file to the archive - but in the opposite panel.
Ctrl+F5 sorts by date/time.
Last edited by petermad on 2020-03-26, 00:55 UTC, edited 1 time in total.
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
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
Re: How to make TC to pack a file into the same directory?
>>It is actually Ctrl+Alt+F5
Oh, yes right, I meant to write "-or- together with ALT+f5".
>> [Shortcuts] for CAS+F5
Ah, I see. The menu item works with CTRL without that wincmd.ini entry, but that INI entry is need to make the keyboard shortcut actually work.
Thanks for the corrections.
And good you also mentioned the other options too to have everything together.
Re: How to make TC to pack a file into the same directory?
I wish that instead of having to memorize all combinations of ctrl/shift/alt with F5/F6 (that are not really consistent, shift allows to stay in the same panel for F5/F6, but this doesn't always work for other combinations because they are already mapped to other functions by default) we just had a checkbox in copy/move dialog that could be marked with a hotkey.
For example, F5 is Copy to other panel, and Shift+F5 is Copy to the same panel. If you add Alt to F5, it's Pack to other panel. You would expect that Shift+Alt+F5 is Pack to the same panel, but nope, it's Pack to other panel (but also Move to archive). It's counter intuitive when you could have Shift+Alt+F5 to Pack to the same panel and if you also want to Move to archive, there is a Move to archive checkbox that you can mark by pressing Alt+o (because o is underlined and this is consistent throughout the whole program).
But now it's too late to change this behaviour, so at least we could have a checkbox like «In the same directory» (note underlined I, so we can just press Alt+I to pack within same panel without mouse).
I really hope some day we'll have it. I'm a new user of TC, I'm just trying to learn all of it's functions and get used to it, but those counter intuitive inconsistencies make it really hard to remember all needed hotkeys. And I'd really like to do all frequently used operations by keyboard, the less you use your mouse, the better.
For example, F5 is Copy to other panel, and Shift+F5 is Copy to the same panel. If you add Alt to F5, it's Pack to other panel. You would expect that Shift+Alt+F5 is Pack to the same panel, but nope, it's Pack to other panel (but also Move to archive). It's counter intuitive when you could have Shift+Alt+F5 to Pack to the same panel and if you also want to Move to archive, there is a Move to archive checkbox that you can mark by pressing Alt+o (because o is underlined and this is consistent throughout the whole program).
But now it's too late to change this behaviour, so at least we could have a checkbox like «In the same directory» (note underlined I, so we can just press Alt+I to pack within same panel without mouse).
I really hope some day we'll have it. I'm a new user of TC, I'm just trying to learn all of it's functions and get used to it, but those counter intuitive inconsistencies make it really hard to remember all needed hotkeys. And I'd really like to do all frequently used operations by keyboard, the less you use your mouse, the better.
English is not my native language.
- ghisler(Author)
- Site Admin
- Posts: 50421
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How to make TC to pack a file into the same directory?
Please hold down the Ctrl key while choosing menu Files - Pack.
You can assign a hotkey with Ctrl to cm_PackFiles to get this option, e.g. Ctrl+Alt+F5:
Configuration - Options - Misc. -> choose hotkey -> click magnifying glass -> pick cm_PackFiles -> OK
You can assign a hotkey with Ctrl to cm_PackFiles to get this option, e.g. Ctrl+Alt+F5:
Configuration - Options - Misc. -> choose hotkey -> click magnifying glass -> pick cm_PackFiles -> OK
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: How to make TC to pack a file into the same directory?
Well, after reading the manual more carefully I just realized that if you remove the packing/unpacking path, TC will assume the current path. So pretty much Alt+F9, Backspace will unpack files to current directory. Knowing this, I don't really need any buttons to do operations in the same panel.
English is not my native language.
Re: How to make TC to pack a file into the same directory?
2ghisler (Author) and/or
2petermad
I have assigned a hotkey with Ctrl to cm_PackFiles as discussed by Ghisler above in order to pack selected files in a current zip into a 7z file in the same folder. How can I make this into a button? Thanks.
2petermad
I have assigned a hotkey with Ctrl to cm_PackFiles as discussed by Ghisler above in order to pack selected files in a current zip into a 7z file in the same folder. How can I make this into a button? Thanks.
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
Re: How to make TC to pack a file into the same directory?
The "in place" is selected if the key ctrl is down, we only have a single command for both actions.
From a button, you need to use either autohotkey or powerpro or.... to simulate ctrl key when calling cm_PackFiles.
The easiest is to use nircmd and create a user commands: in usercmd.ini file.
You can use a text editor to add the following commands or edit one by one using command browser : cm_CommandBrowser
Once done, you can assign em_packInPlace to any button !
From a button, you need to use either autohotkey or powerpro or.... to simulate ctrl key when calling cm_PackFiles.
The easiest is to use nircmd and create a user commands: in usercmd.ini file.
You can use a text editor to add the following commands or edit one by one using command browser : cm_CommandBrowser
Code: Select all
[em_ctrldown]
button=
cmd=nircmd
param=sendkey ctrl down
[em_ctrlup]
button=
cmd=nircmd
param=sendkey ctrl up
[em_packInPlace]
button=WCMICONS.DLL,30
cmd=em_ctrldown,cm_wait 1,cm_PackFiles,em_ctrlup
menu=Pack in place
Re: How to make TC to pack a file into the same directory?
2nsp
or perhaps like this?
Step 1)
wincmd.ini
[Shortcuts]
CA+F5=cm_PackFiles ; Ctrl+Alt+F5 = pack to an archive into the same directory
Step 2)
nircmd sendkey Ctrl+Alt+F5
?
or perhaps like this?
Step 1)
wincmd.ini
[Shortcuts]
CA+F5=cm_PackFiles ; Ctrl+Alt+F5 = pack to an archive into the same directory
Step 2)
nircmd sendkey Ctrl+Alt+F5
?
Re: How to make TC to pack a file into the same directory?
I do not use nircmd to send full shortcut with modifier (shift/ctrl) to TC as it needs wait to get captured. I'm pretty sure that it does not work ! PowerPro,AHK,AutoIt.. are beter for this task.
I'm pretty sure that it does not work in a single command ! PowerPro,AHK,AutoIt.. are beter for this task.
I do not use nircmd sendkey to send full shortcut with modifier (shift/ctrl) to TC as it needs small wait to get captured.Stefan2 wrote: 2021-12-14, 10:01 UTC 2nsp
or perhaps like this?
Step 1)
wincmd.ini
[Shortcuts]
CA+F5=cm_PackFiles ; Ctrl+Alt+F5 = pack to an archive into the same directory
Step 2)
nircmd sendkey Ctrl+Alt+F5
?
I'm pretty sure that it does not work in a single command ! PowerPro,AHK,AutoIt.. are beter for this task.
Re: How to make TC to pack a file into the same directory?
2Stefan2
Thank you so much!
With a littler fine tuning I was able to pack selected files within an existing zip file into a new 7z file in the same folder.
Step 1 let you use Ctrl+F5 to do this rather than Ctrl+Alt+Shft+F5 or Ctrl+ a button that packs files.
Step 2 creates a button out of Step 1 using nircmd v2.86, https://www.nirsoft.net/utils/nircmd.html. There is a 32 bit version. In the button point to your location for nircmd or copy it to the windows directory to use it without a path.
Step 1 - Create a hot key
wincmd.ini
[Shortcuts]
CA+F5=cm_PackFiles ; Ctrl+Alt+F5 = pack to an archive into the same directory
Step 2 - Create a button out of the hotkey. Copy from TOTAL through -1 and past it into a button bar.
Thank you so much!
With a littler fine tuning I was able to pack selected files within an existing zip file into a new 7z file in the same folder.
Step 1 let you use Ctrl+F5 to do this rather than Ctrl+Alt+Shft+F5 or Ctrl+ a button that packs files.
Step 2 creates a button out of Step 1 using nircmd v2.86, https://www.nirsoft.net/utils/nircmd.html. There is a 32 bit version. In the button point to your location for nircmd or copy it to the windows directory to use it without a path.
Step 1 - Create a hot key
wincmd.ini
[Shortcuts]
CA+F5=cm_PackFiles ; Ctrl+Alt+F5 = pack to an archive into the same directory
Step 2 - Create a button out of the hotkey. Copy from TOTAL through -1 and past it into a button bar.
Code: Select all
TOTALCMD#BAR#DATA
F:\TC_64\Addons\Nircmd_64\nircmd.exe
sendkeypress Ctrl+F5
wcmicons.dll,30
Pack selected files within archive with name of file under cursor in same folder
-1
License #1945
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64
Windows 10 Pro x64
Version 22H2 (OS Build 19045.3930)
TC 11.00 x64 and x86, Everything 1.5.0.1366a x64, QAP 11.6.3.1 x64