INI settings of the LZX plugin for Total Commander


This documentation explains the settings of the LZX plugin v2.0 and later versions. It was last modified on 13.07.2012. There is no difference in settings between v2.0 and later published versions of the plugin.

For a German version see INI-Einstellungen des LZX-Plugins für Total Commander.

This documentation is part of the archive lzx_plugin.zip available on the plugins page of the website of Total Commander.

Location and name of the INI file

The used INI file is either:

  1. The default packer plugin INI file pkplugin.ini in the directory of the currently used Total Commander INI which is by default Wincmd.ini. This is the preferred INI file for the plugin. The file pkplugin.ini is available since v5.51 of Total Commander.
  2. Or Unlzx.ini in the directory of pkplugin.ini (Wincmd.ini). This is the first alternative INI file for the plugin.
  3. Or Unlzx.ini in the directory containing the LZX plugin. This is the second alternative INI file for the plugin.


The plugin checks first if the current version of Total Commander supplies the plugin with the information about the default packer plugin INI file. If Total Commander prior v5.51 is used, the plugin ignores the default packer plugin INI file and looks for the INI file in the plugin folder (second alternative).

If Total Commander supplies the default packer plugin INI file name with path, the plugin checks if the file exists and if so opens it and looks for the Unlzx settings.

If the default packer plugin INI does not exist or does not contain the settings for the LZX plugin, it searches for an INI file with the name Unlzx.ini in the directory of pkplugin.ini. If the Unlzx.ini exists, the plugin uses this INI file. If there is no Unlzx.ini in the directory of pkplugin.ini, the plugin searches for the INI file in the plugin directory.

If the settings were not found in pkplugin.ini and also no Unlzx.ini exists, the plugin writes the default settings with comments to the file pkplugin.ini. This INI is preferred by the plugin because it can be user specific (for multi-user Windows environments) and the directory is normally not write-protected for the current user because Wincmd.ini is also in this directory.

If writing to pkplugin.ini is not possible - a Total Commander prior v5.51 is used or the file/directory is write protected - the plugin tries to write the default settings with comments to the Unlzx.ini in the folder of the pkplugin.ini or the plugin folder.

Note: The plugin can use Unlzx.ini in the plugin folder only if Unlzx.wcx respectively Unlzx.wcx64 is not renamed.

Last if writing the default settings to an INI file is not possible, i.e. data medium is read-only or restricted user mode, the plugin will use the default settings without saving them.


Modifying the settings

There is currently no graphical user dialog to modify a setting. The INI file must be opened with a text editor like Notepad and the settings must be manually modified. All settings are loaded while opening an LZX archive. If an LZX archive is currently open and for example the setting LZXPacker is just modified and the list of archived files with the new setting should be viewed, the archive must be closed (go up until outside the archive, key F2 or Ctrl+R), and then open an other archive or change something of the archive file (time, attributes) and reopen the archive again (with Enter or Ctrl+PgDn) for activating the new setting. It is necessary to open a different archive or change the file date/time or an attribute of the archive file after changing a setting because Total Commander caches the list of archived files and so does not call the plugin to reread the archive content with the new settings. Those additional steps after modifying a setting are not necessary if an action is executed on the archive which needs an extraction of the data of an archived file, for example one or more files are unpacked, the content of an archived file is viewed or a text search in the archived files is executed.

All settings of the LZX plugin are read from a section named [Unlzx].

As a little help the plugin adds a comment after every setting. The comments can be removed to decrease the INI file size if not needed. They can be also translated to a different language. The comments can be even moved from right side of a setting to a new line above if it is preferred to have the comments above a setting instead of on right side. The comments are written to the INI either in German or English depending on the current default language of the current user in the Regional and Language Settings of Windows. English is used for all non German languages.

The plugin writes the default settings always with comments to the INI when no setting for the plugin exists. Invalid or missing settings are automatically corrected or added and duplicate settings are automatically deleted. If modifying an entry in the [Unlzx] section must be done by the plugin because of an error, it will recognize if one of the other settings has a comment or not. If all other settings don't have a comment (above or on right side), the correction is done also without writing the default comment for the corrected setting.

The plugin doesn't use the Microsoft functions to read/write the INI settings. So there is no 64 KB file size or a line length limit. The lines in the INI can be terminated with carriage return (CR) + line-feed (LF) (=MS-DOS), only LF (=UNIX) or only CR (=MAC) even mixed in one file. But the plugin writes its settings always with CR+LF into the INI because it is written for Windows. The INI can be also converted to UTF-8 with or without BOM (byte order marker) if this encoding is needed for the translation of the comments. UTF-16 is not supported!

Don't forget to delete Unlzx.ini or the [Unlzx] section in pkplugin.ini if the plugin is uninstalled permanently.


Setting ArchiveTime

Many packers have an option to set the file time of the archive to the newest file time inside the archive after adding or updating files to an archive. But the file time of the archive is mostly useful for the person who has packed the archive on its computer or local network because it is lost when uploading or downloading a file to/from WWW. So for the users which download an archive via FTP or HTTP or get it by email it would be cool to have an option in the unpacking tool to scan the archive for the newest file time inside the archive and set then this time to the archive file itself. With archive file time always set to newest file it would be for example much easier to handle different versions of an archive on local comparison or compared with archives online. Very often several versions of an archive (installation package of a program) exist with identical file names. Which one contains really the newest version? Unfortunately no packer/unpacker has such an option (as far as the author knows) although this action does not modify the archive content.

Total Commander users can open or unpack the whole archive, switch to branch view with Ctrl+B, sort the list of files according to the date/time and then manually set the file time of the archive file to the newest file time in the branch view. That's no problem for 1 archive, but for dozens of archives it's extremely annoying not to have such a simple non archive content modifying feature.

Eugene Roshal, author of RAR, has told the author of this document some dummy commands which can be used to set the file time of a RAR archive to the newest file time inside the RAR archive. For example:

rar rn -tl *.rar dfadsdzds dfadsdzds

"dfadsdzds" is just a random string, which should not be present among archived file names. But this workaround does not work for locked or password protected RAR archives. Such archives don't allow modifying the archive content, although this rename command does nothing because such a file does either not exist or its name is not really changed.

The LZX plugin is now maybe the first unpacker which supports setting the file time of the archive to the newest file time inside the archive without modifying the archive file content. While the archive is scanned for the files in it, it automatically compares the file time of all files to determine the newest file time inside the archive. Stored empty directories are ignored because the time of directories is often not really representative.

With the setting ArchiveTime it can be specified how the plugin should handle the file time of the archive file when the archive is closed. There are 3 possible values:


The default setting written to either pkplugin.ini or Unlzx.ini is:

ArchiveTime=0     ; 0 ... never modify | 1 ... newest time, not future | 2 ... always newest time

Setting the archive file time to the newest file time inside the archive is a non archive content modifying feature. It can be done on hundreds of LZX archives at once. Just set this setting to 1 or 2 and run a search for whatever wanted. It can be a dummy search or a really useful search that does not matter. Important is that the search option Search archives is enabled in the search dialog. For faster search the LZX archives should be selected before, but it's not absolutely necessary. When this search is executed, Total Commander will call the LZX plugin for every LZX archive to get the full list of archived files and that's enough to set the archive file time to the newest file time inside the archive.

In following situations the archive file time is not set by the plugin:


Because of the Y2K bug of the LZX packer the setting LZXPacker should be set to the value which is best for the LZX archives opened or preselected for viewing, searching or unpacking when using this feature.


Settings for file attribute handling

The AMIGA OS knows 8 protection flags (bits, attributes) for files which are in bit order:

bit 7 ... p... pure command
bit 6 ... s... script file
bit 5 ... h... hidden file
bit 4 ... a... archived file
bit 3 ... e... executable file
bit 2 ... d... deleteable file
bit 1 ... w... writeable file
bit 0 ... r... readable file

By default the bits rwed are set when creating a new file and the bit e is unset for files after editing which are not programs like the .info files (comparable with .lnk files of Windows OS) or text files and documents.

Ignoring the NTFS permissions only 3 AMIGA file attributes can be converted to a Windows equivalent file attribute.

bit 5 ... a... archive - file must be still archived
bit 1 ... h... hidden - file is normally hidden
bit 0 ... r... read-only - writing to file is denied

But a simple write of the attributes byte of the archived AMIGA files to the extracted files on a Windows OS is the wrong solution because the bit order and also the meanings of the bits do not match. That can be seen if AMIGA LhA archives with files without the bit e as most .info files are stored in a LhA archive are unpacked. After the LhA extraction these files have the hidden attribute set.

The LZX plugin since v2.0 is better because it correctly interprets and translates the AMIGA file protection flags to Windows file attributes. It can be even specified how the attributes should be applied to the extracted files.

The attributes are applied according to the 3 attribute settings only on files. The attributes of stored empty directories are always ignored because Total Commander creates the directories itself and never applies the attributes according to the information from the plugin/archive. That's the reason why the plugin also ignores the attributes for empty directories. So what can be seen in an opened archive will also be produced when extracting the archive.

Note:  The following description is based on the most needed conversion of AMIGA protection flags to MS-DOS file attributes. The plugin detects also, if the files in the LZX archive are packed on DOS, Windows, OS2 or UNIX. The DOS/Windows attributes archive, hidden and read-only are evaluated also correct - hopefully because not tested for lack of DOS/Windows packed LZX archives - and applied accordingly when the following explained settings have the value 1. OS2 and UNIX file attributes are still ignored. The system attribute is set never except for DOS/Windows packed LZX archives because there is no AMIGA equivalent for it.

The setting AttribArchive determines how the archive attribute should be set for the extracted files. This setting has 3 possible values:


The archived bit is used rarely on AMIGA computers because it is normally set only by backup programs to mark a file as already being archived after an archive process. So the archived bit on AMIGA computers has the exactly opposite meaning as the archive attribute on Windows computers where the archive attribute means that the file must be still archived. This is the reason why the inverted state of the archived attribute is applied after extracting a file when the setting has value 1. On stored empty directories the archive attribute is never set according to Windows standard. Empty directories are created by Total Commander itself and not by the plugin while unpacking an archive.

The default setting written to either pkplugin.ini or Unlzx.ini is:

AttribArchive=0   ; 0 ... never set | 1 ... inverted archived bit | 2 ... always set


Extremely rarely used is the hidden attribute on AMIGA computers because the AMIGA OS never has really supported it and does not hide the file if this bit is set. It can be supposed that the archive lzx_test_attrib_cmt.lzx in the file lzx_source.zip is the only LZX archive which contains a file with hidden attribute set. Nevertheless the hidden attribute handling is also implemented into the LZX plugin for completeness.

The setting AttribHidden determines how the hidden attribute should be handled for the extracted files. This setting has 2 possible values:


The default setting written to either pkplugin.ini or Unlzx.ini is:

AttribHidden=0    ; 0 ... never set | 1 ... hidden bit


The last applicable AMIGA file flag is writeable. It can be applied with inverted state to the read-only attribute (= NOT writeable) of Windows.

The setting AttribReadOnly determines how the read-only attribute should be handled for the extracted files. This setting has 2 possible values:


The default setting written to either pkplugin.ini or Unlzx.ini is:

AttribReadOnly=0  ; 0 ... never set | 1 ... inverted writeable bit


Settings LZXPacker and TouchFiles

The setting LZXPacker is needed for correct interpretation of the archived file dates according to the LZX packer used for the current archive. The plugin cannot detect automatically which LZX packer was used for the archive. This setting is needed only for archived files with a file date since 01.01.2000. There are 3 possible values:


For more details about the problems with the date data of the archived files see LZX date problem handling with the LZX plugin.

The default setting written to either pkplugin.ini or Unlzx.ini is:

LZXPacker=0       ; 0 ... original LZX | 1 ... LZX with Titov's patch | 2 ... LZX with Calusinski's patch


With the setting TouchFiles it can be specified to extract the files either with the archived file date/time (new in v2.0) or with the current system time as all LZX plugin prior v2.0 do. So this setting has only 2 possible values:


The default setting written to either pkplugin.ini or Unlzx.ini is:

TouchFiles=0      ; 0 ... archived file time | 1 ... current system time

TouchFiles=1 is like using the LZX option -E   touch extracted files.

The value of the setting LZXPacker is unimportant when the files are only extracted and the setting TouchFiles has not the value 0.
With TouchFiles=1 the value of LZXPacker is useful only for viewing the list of archived files with correct file date.


Setting SaveFileNotes

The AMIGA file systems support file notes (comments) with a length of up to 79 characters (80 bytes with terminating null byte). The LZX compression algorithm supports like LhA also the file comments and store it in the archive by default. Adding the file notes to the archive must be explicitly disabled with the option -f when creating an archive.

Since v5.50 Total Commander supports also file comments stored in a normally hidden file named descript.ion or files.bbs. The LZX plugin since v2.0 supports now also writing the file comments from the LZX archive to descript.ion, but not to files.bbs. If this feature is enabled, the file comments are saved while extracting a file always as is without any conversion. So the comments are always stored in ANSI because the AMIGA OS uses ANSI character set.

The comments are not saved to descript.ion if such a file already exists, but is a binary file. A file is handled as binary file if it contains at least 2 bytes with hex code lower the space character (0x20) except horizontal tabs (0x09), line-feeds (0x0A), form-feeds (0x0C) and carriage returns (0x0D) till end of file or an existing comment line for the current file. An existing text file with file comments will be updated with the file comments from the archive. The plugin does not test if an existing text file named descript.ion is really a storage of file comments for existing files in this directory. The plugin appends only file comments for files not present in the comment file or replaces the file comment for the just extracted file with the comment stored in the archive, if the archived file has a comment. Other file comments in an already existing comment file are not touched.

The current version 8.00 of Total Commander does not support showing the file comments when viewing the list of archived files, although the internal structure would already support it. If there will be ever a version of Total Commander which would support showing the file comments when viewing the list of archived files, the LZX plugin v2.0 is prepared already for it and would supply Total Commander with the necessary data.

With the setting SaveFileNotes it can be specified how to handle the archived file comments while extracting one or more files. There are 3 possible values:


The default setting written to either pkplugin.ini or Unlzx.ini is:

SaveFileNotes=0   ; 0 ... no file note saving | 1 ... save to descript.ion

The plugin trims automatically all trailing spaces of a file comment and converts also all characters lower a space (0x20) to a space to avoid problems on Windows.

On AMIGA also directories can have a comment. But this comment is never stored in an LZX archive except for empty directories which are stored in the archive with its comment if the user has used the LZX packer option -e. However, when unpacking an archive with empty directories, Total Commander itself creates the empty directories and does not call the plugin. So the plugin cannot save the comment of a directory in descript.ion. Comments for directories are used very rarely on AMIGA and as the name of the AMIGA command filenote assumes already, the command is designed to write comments/notes for files and not directories.

When the plugin creates a new descript.ion file, it sets the hidden attribute like Total Commander also does. As a special feature the setting SaveFileNotes can also have the value 2. That instructs the plugin not to set the hidden attribute when creating a new file descript.ion. Please note that this is a not recommended setting and so the comment in the INI file does not mention the value 2.

There are several actions where Total Commander extracts files from an archive with the plugin for temporary usage. For these actions the plugin should not write a file comment to the comment file in the destination directory. These actions are:


Do determine if the extraction is only temporarily the plugin evaluates the destination path and file name. If one of the following conditions is true, an existing file comment is not saved to the comment file in the destination directory of the file.


If environment variable TEMP is not set, the temp directory is defined as  %WINDIR%\TEMP .

This handling avoids the creation of descript.ion files in the temp directories used by Total Commander.


Summary of all default settings

On first run the LZX plugin v2.0 writes following lines to either pkplugin.ini or Unlzx.ini:

[Unlzx]
ArchiveTime=0     ; 0 ... never modify | 1 ... newest time, not future | 2 ... always newest time
AttribArchive=0   ; 0 ... never set | 1 ... inverted archived bit | 2 ... always set
AttribHidden=0    ; 0 ... never set | 1 ... hidden bit
AttribReadOnly=0  ; 0 ... never set | 1 ... inverted writeable bit
LZXPacker=0       ; 0 ... original LZX | 1 ... LZX with Titov's patch | 2 ... LZX with Calusinski's patch
SaveFileNotes=0   ; 0 ... no file note saving | 1 ... save to descript.ion
TouchFiles=0      ; 0 ... archived file time | 1 ... current system time


The comments can be removed to decrease the INI file size from 575 bytes to 119 bytes if the comments are not needed. Deleting the comments makes most sense for pkplugin.ini if it contains also other packer plugin settings. Because the byte gain is maximal 512 bytes if the file system of the INI drive uses a cluster size of 512 bytes, the comments should not be deleted from Unlzx.ini.

LZXPacker is normally the only setting which must be modified more than once. All other settings are just to configure the LZX extraction to your personal preferences.