Total Commander Xz Archive Plugin

33 views
Skip to first unread message

Ceola Roefaro

unread,
Aug 3, 2024, 1:44:52 PM8/3/24
to chestvesttweenwin

How to install and use a packer plugin:
1. Unzip the downloaded archive to any directory
2. In Total Commander, choose Configuration - Options
3. Open the 'Packer' page
4. Click 'Configure packer extension WCXs'
5. Type an extension suitable for the plugin, e.g. "lst" for diskdir
6. Click 'New type', and select the .wcx file
7. Click OK in all open dialog boxes.
You can now use the plugin via Files - Pack (or by opening archives of this type).

How to install a file system plugin:
1. Unzip the plugin to a directory of your choice.
2. In Totalcmd, choose Configuration - Options - Operation - FS-Plugins
3. Click on "Add"
4. Choose the .wfx file of thatplugin and click OK

You can now access the new file system via the Network Neighborhood.

How to install a lister plugin:
1. Unzip the plugin to a directory of your choice.
2. In Totalcmd, view any file with F3
3. Choose Options - Configure - LS-Plugins
3. Click on "Add"
4. Choose the .wlx file of that pluginand click OK

You can now access the new lister plugin with F3.

You would need to change directory (the cd command) to the F:\Downloads directory first, or whatever directory you would want to perform the mass compression. Also, it is easy enough to substitute in *.exe or whatever extension you want to filter for to just compress those documents.

I've just been working on exactly this problem and one of the issues I found was duplication of the folder name within the archive, i.e. when compressing a folder called "foo" an archive containing .\foo\fighters.txt is produced instead of just one containing fighters.txt.

You can download and install 7zip plugin for Total Commander from you do that on the right side of the window from your screenshot there will be another selection for 7zip compression. With that option you can accomplish exactly what you are asking for.

After calling the view (F3) or edit (F4) command, Double Commander will extract the file under the cursor to the system directory for the temporary files and open it. After closing the viewer, the temporary file will be deleted. If the file opened in the editor is changed, Double Commander will offer to pack it back (if the compressed file format and the packer plugin or external archiver support this feature).

Just to make things clear, using an external archiver may be summarized as this: it's a way to launch the archiver we may be familiar with but to have it driven by Double Commander, by providing to the archiver executable the various parameters we would need to make it like integrated into the application.

We then need to indicate us a significant description for the archiver, the exact location where is the executable of the archiver and then associated file extension, without the period, to that archiver.

A few words about the "Use archive name without extension as list" option: This option is intended for archives that can contain only one file and the filename is equal to the archive name without extension (Bzip2, XZ and others). Such compressed files usually do not contain the name of the original file.

If it would not be possible to be sure it starts the line, like for example if the external archiver would start the line with the date and time, and then a constant string, we would set the magic string to be the constant string but we would not add the caret which instruct to Double Commander that the string to search might be anywhere.

It might be a little bit more complex than having nothing to do, but on the other hand, it gives us maximum of flexibility by being able to use external archival Double Commander developers were not even aware of!

So the beauty of the thing here is to use the available expressions from the previous table to write the "Listing format" string that will configure Double Commander for that external archiver so it will be able to get the content of the archive concerning directory and filenames, filesize, attributes, file dates, etc.

First guess for us to help to generate that line would be to write in Notepad for example a line of text for one file we've done manually previously and write below that expression from the previous table that would fit.

So as we can see, we wrote the parsing expression letter matching to each field at the same exact position where it is located into the output of the archive content that our external archiver outputed us:

So configured that way, if we select our previous "just.rar" archive into a panel, we press Enter to get into it like it would be a directory, we see the file content showing us what we did "basically" worked (if we ignore the last file...):

So we will take advantage of the variable %L that Double Commander offers us which will create a text file with inside each and every file selected requested from the active to be extracted and that's this single list file that we will pass in parameter.

We may not realize at first but when we'll "enter in" the archive like it would be a directory and we would press F3 to view the content of a file inside the archive, this "Extract" action will took place in background. The selected file will be extracted using that pattern into the system directory for the temporary files and then that's this temporary file that we will look at with the F3 invoken viewer.

Still continuing our example with "rar.exe", we know from its documentation that we use the command "a" to indicate we want to create an archive or to add to an existing archive a file or a group of files.

So we will take advantage of the variable %L that Double Commander offers us which will create a text file with inside each and every file selected requested from the active panel to be added to the archive and that's this single list file that we will be passed in parameter.

By default when invoking the internal command cm_ExtractFiles to unpack an archive, if the files inside it are arranged with a certain directory structure, then archiver will recreate the same structure while extracting the files.

This is useful when we want to be sure the persons who will need the content of the compressed file won't have problem to uncompress it: nothing needs to be installed, just execute the file and we'll get the uncompressed ones!

To create a self-extracted, please note that the procedure is the same as usual as when creating the compressed file, like using internal command cm_PackFiles, but in the requester that appear, we'll check the option "Create self extracting archive".

We may configure Double Commander in such way that it will ignore file extension of a file and attempt to detect a compressed file archive by it's internal content and then invoke the appropriate list and unpack commands described above.

Another example would be to see the content of archive that is saved with a different file extension than the regular archive like the .docx file of Microsoft Word which in fact actually a compressed ZIP file.

ID Position (optional) is a position of ID in archive. If not present, ID will be searched in the beginning of archive. We can define the positions with "-" sign: in this case the positions will be calculated from the end of file. Special value determinated search ID if not found by numeric values of ID Position. Seek in range "0 .. size of file" or "0 .. ID Seek Range". Values can be writed as decimal (12345) or hexadecimal (0x3039). For negative values use notation 0xFFFFFFFF (-1).

So when we invoke internal command cm_OpenArchive, Double Commander will scan content of the file and it recognize the "0x37 0x7A 0xBC 0xAF 0x27 0x1C" pattern at offset 0 in the file, it will process it as it is our configured 7Z type of file and then use the associated configured commands and parameters for listing, extract, etc.

In most cases, there is no need to examine files in hexadecimal representation: the file signature can be found in the format specification or use existing lists, databases or utilities (for example, this Wikipedia page or FreeDesktop.org MIME database).

By default, files whose extensions are specified in the settings of WCX plugins and external archivers are opened as folders. To open them in an associated application, we can use the "Open" item in the context menu of the file (but in this case only system file associations will be used) or we can add the desired action to the "Actions" menu.

If an external archiver is used to unpack files, then we can specify a non-existent file extension and fill in the fields for using ID. For example, CHM documents: "chm2" instead of "chm", signature "49 54 53 46" and offset 0.

MSIs are an OLE-based file, containing database for Windows Installer.Microsoft provides a set of API that can handle MSI archives. This plugin utilizes these APIs and provides an easy way to extract embedded binaries and databasetables from an MSI file as if it was a ZIP file.

If you're like me, you constantly move and rename files and directories. You are also an extremely productive person with evangelical ideals of making every task as efficient as it can be. In this tutorial, I will use my favorite must-have file manager called Total Commander (formerly, Windows Commander) and its brilliant Multi-Rename Tool.

You can download a shareware version of Total Commander at www.ghisler.com. I encourage you to buy it after you try it as it'll soon become an integral part of your life. I've been using it for more than 10 years now and seriously can't imagine my computer without it.

Now you can press Start to make the changes final. Have no fear: there's an Undo button that will undo the last rename operation in case you made an error, even if you close and reopen the Multi-Rename Tool. You can also press the little button to the left of Start, which will reload the newly renamed filenames into the tool for further manipulations.

This solution is going to work fine in this case, but it's not going to work for all possible cases. For example, if the file name were vac-sick-evacuation request form 03-10-08.xls, the resulting filename would be vacation-sick-evacationuation request form 03-10-08.xls. In order to fix this, I will use a simple regular expression:

c80f0f1006
Reply all
Reply to author
Forward
0 new messages