Total Commander (TC) has a feature called “packing”, which is actually built-in support for zip files that allows you to easily double-click a zip file and open it as if it was a folder – navigate zipped folders hierarchy, copy/move files and folders from it or open/edit/view files in it.
This is very handy, but often, I have to deal with zip files with other non-zip extensions, where double-clicking them opens them with another application, but I want to inspect their zipped content within Total Commander as if they had a zip extension. Three common samples for such files are XPI files used to package and install Firefox extensions, JAR files and EXE files which are actually self-extracting zip files. I’m currently working on two internal install frameworks. One of them generates a Setup.jar install file, and the other one, one run on Windows, generates a self-extracting exe using WinRAR.
In these three samples, when I want to view the zipped file content, I used to be forced to either open the file with 7-zip, or renaming the file to have a zip extension and open it in Total Commander.
Recently, I found out that there is a better way to handle this in Total Commander 7.
A few weeks ago I discovered that if I try to change the current directory of a Total Commander panel to a file and not a directory, Total Commander changes the directory to the directory of that file, and then selects the file, which is a handy feature of its own. However, if this file is a zip file, then Total Commander will not select the file, but instead, it will open it as a zip file. The good news is that this is true for all zip files, even those with other extensions like EXE, JAR or XPI.
Note that this only works with Total Commander 7 and not in earlier versions. Also note that this magic only occurs if you change the directory of the panel to the full absolute path of the zip file. Using a partial relative path won’t work, and Total Commander will not change the directory.
On my machine, where Total Commander is configured to have Ctrl-G start editing the panel path and Ctrl-P copies the full path of the selected file(s), I can easily select a zip file and type Ctrl-P, Ctrl-G, Enter to browse the file zipped content, but on other machine that doesn’t have this keyboard remapping, I’m using the following sequence:
- <Right Arrow> – to show the TC command line in case it is hidden (it is hidden on my machine)
- type cd
- <Ctrl-Shift-Enter> – to copy the full path of the selected file to the command line. This is a standard TC keyboard shortcut.
- <Enter> – to invoke the magic
I added “(obsolete)” to this post subject because after writing all of this, I went over the post draft to add links to the relevant words, and when I looked for a link that explains Total Commander support for zip files, I found these two FAQs about how to open JAR files and how to open self-extracting archives and realized that TC has a built-in support for handling this problem – using Ctrl-PageDown, so my tricks are pretty much obsolete. However, I thought this still deserves publishing, as it might reveal new features for TC users who read this.