Lister F3: add external viewer for unsupported file types

Here you can propose new features, make suggestions etc.

Moderators: petermad, Stefan2, Hacker

Post Reply
User avatar
zhugecaomao
Junior Member
Junior Member
Posts: 90
Joined: 2022-08-23, 05:08 UTC
Contact:

Lister F3: add external viewer for unsupported file types

Post by *zhugecaomao »

This suggestion follows up on the discussion in my previous thread: viewtopic.php?t=87614

Currently, Total Commander allows users to customize how specific file extensions are opened in Lister via Configuration -> Options -> Lister -> Multimedia -> "Define view method by file type...". However, the default view methods are strictly limited to the internal options (1 to 8 ).

When no suitable internal Lister method or plugin is available — or when a user prefers a highly optimized external application (such as a specialized standalone CAD/DWG viewer) — they are forced to use the Alt+F3 combination configured via External Viewer → Associations....

The Problem:
The expected consistent behavior in TC should always be:
F3 → View files (Lister or assigned viewer)
F4 → Edit files

Relying on Alt+F3 as a workaround breaks this consistent muscle memory. For maximum daily productivity, F3 should handle all quick-viewing tasks uniformly across all file types.
Furthermore, forcing complex technical formats (such as DWG drawings) into the standard Lister window via unstable plugins or slow Explorer preview handlers frequently causes performance lags or crashes — making the workaround unreliable in practice.

Proposed Solution:
Extend the "Define view method by file type..." dialog by adding "9. External Viewer" as a selectable option.
When configured, pressing F3 on a matched file type would seamlessly launch the user-defined external viewer, keeping F3 muscle memory uniform across all file types.

How it fits into the existing UI logic:

Code: Select all

Configuration -> Options -> Lister -> Multimedia -> [Define view method by file type...]
    │
    ├── File type: *.dwg;*.dxf
    └── Default view method (Choose from 1 to 9):
        1. Text only
        2. Binary
        3. Hex
        4. Image/Multimedia
        5. HTML Text
        6. Unicode
        7. UTF-8
        8. Explorer Preview
        9. External Viewer (User-defined)  <-- New Option
Benefits:
- Unified Muscle Memory: Restores single F3 key behavior for all file extensions, whether viewed internally or externally
- Unified Configuration: Merges internal and external viewer settings into a single, consistent interface — eliminating the current split between Lister configuration and Alt+F3 associations, as solid said
- Speed & Stability: Bypasses sluggish or crash-prone Explorer preview handlers for specialized formats by cleanly passing the file to a fast external engine

I believe this would be a highly practical and logical enhancement to TC's existing Lister configuration. Feedback from the community and ghisler is welcome.
Last edited by zhugecaomao on 2026-05-20, 11:34 UTC, edited 3 times in total.
Total Commander 11.58 RC5 x64 #339325
Windows 11 Pro 25H2 x64
Everything 1.5b x64
Website | Github
User avatar
Native2904
Senior Member
Senior Member
Posts: 439
Joined: 2014-01-30, 14:23 UTC
Location: Aachen

Re: Add "9. External Viewer" to "Define view method by file type" in Lister (F3)

Post by *Native2904 »

Hi, what are the arguments against internal file association?
Glückauf
#270101 Single user licence.
Total Commander 64-bit – latest version – Windows 11 Pro 24H2
monarch-lfv
Member
Member
Posts: 109
Joined: 2022-06-16, 23:37 UTC

Re: Add "9. External Viewer" to "Define view method by file type" in Lister (F3)

Post by *monarch-lfv »

2zhugecaomao
I have a slightly different, but similar, proposal. At the very least, what you're asking for can be implemented using the old "Anycmd" plugin. I applied it like this:
anycmd.ini
[AnyCmd]
command=%Commander_path%\Plugins\wlx\anycmd\Info.bat "%s"
DetectString=EXT="KML"|EXT="KMZ"|EXT="GPX"|EXT="DWG"|EXT="BAK"|EXT="TXT"
Stream=1
Info.bat
@echo off
If /i "%~x1"==".dwg" (set mode="DWG")
If /i "%~x1"==".bak" (set mode="DWG")
If /i "%~x1"==".kml" (set mode="KML")
If /i "%~x1"==".kmz" (set mode="KML")
If /i "%~x1"==".gpx" (set mode="KML")
If /i "%~x1"==".txt" (set mode="TXT")

If %mode% == "DWG" (
start /WAIT "" "%Commander_path%\Plugins\wlx\anycmd\DWG_Info.vbs" %1
type "%Temp%\~$%~n1.txt"
del "%Temp%\~$%~n1.txt"
)

If %mode% == "KML" (
start /WAIT "" "%Commander_path%\Plugins\wlx\anycmd\KML_Info.vbs" %1
type "%Temp%\~$%~n1.txt"
del "%Temp%\~$%~n1.txt"
del "%Temp%\doc.kml"
)

If %mode% == "TXT" (
start /WAIT "" "%Commander_path%\Plugins\wlx\anycmd\Notepad.vbs" %1
echo Nothing
)
And inside VBS scripts, use the input argument:

Code: Select all

filename = wscript.arguments(0)
And do whatever you want with it, including opening it with any third-party program.

The simplest file that opens, for example, notepad is as follows:
Notepad.vbs
On error resume next
Set WshShell = WScript.CreateObject("WScript.Shell")
filename = wscript.arguments(0)
WshShell.run """notepad.exe """"" & filename & """""", 1, false
I managed to realize my wishes.
I'm using Notepad here as an example (I don't really use it). I get the user properties of the DWG file, the author who last edited the file, when it was last saved, and which CAD program. KML files provide information about placemarks. Unfortunately, AnyCMD can only output text information (STDOUT).

It would be great if there was a similar plugin that could be customized, at least for font selection.

I'm not a programmer at all, and I don't know how to write plugins, like most users, but I think many could write their own in a lightweight scripting language without compiling.

So, my wish is this: create a interlayer plugin that would pass the desired arguments from lightweight scripting languages. Perhaps the respected author of Total Commander, Christian, can do this, or perhaps someone else. I think the idea is clear.
Last edited by monarch-lfv on 2026-05-16, 08:59 UTC, edited 2 times in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7579
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Add "9. External Viewer" to "Define view method by file type" in Lister (F3)

Post by *Horst.Epp »

There are several versions of TC F4 editor tools
which allow defining more than 1 app for opening a file.
Also, you can define buttons which opens a file with a certain plugin using em_commands
Windows 11 Home, Version 25H2 (OS Build 26200.8875)
TC 11.58 x64 / x86
Everything 1.5.0.1417b (x64), Everything Toolbar 2.4.1
QAP 12.3 x64, Listary Pro 7.0.0.5 beta
User avatar
zhugecaomao
Junior Member
Junior Member
Posts: 90
Joined: 2022-08-23, 05:08 UTC
Contact:

Re: Add "9. External Viewer" to "Define view method by file type" in Lister (F3)

Post by *zhugecaomao »

The expected consistent behavior should always be:

F3 – View files (Lister or assigned viewer)
F4 – Edit files

I would like to keep F3 strictly as the “view” function.

However, for certain file types (e.g. DWG), when no suitable internal viewer (Lister plugin) is available, I want F3 can set to an external viewer instead of failing or forcing a different shortcut.

Key requirement:

* Use Lister/plugin when available
* If not available or not suitable → open with assigned external viewer
* No change to F3 behavior for other file types
Total Commander 11.58 RC5 x64 #339325
Windows 11 Pro 25H2 x64
Everything 1.5b x64
Website | Github
User avatar
solid
Power Member
Power Member
Posts: 764
Joined: 2004-08-09, 11:20 UTC

Re: Add "9. External Viewer" to "Define view method by file type" in Lister (F3)

Post by *solid »

Strongly support this suggestion.

It keeps consistency, expands the internal viewer capabilities, and can even merge the settings for internal and external viewers.

Configuring Lister is the most cryptic part of TC.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 7579
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Add "9. External Viewer" to "Define view method by file type" in Lister (F3)

Post by *Horst.Epp »

solid wrote: 2026-05-16, 20:11 UTC Configuring Lister is the most cryptic part of TC.
Not with the TC Plugin Manager :)
Windows 11 Home, Version 25H2 (OS Build 26200.8875)
TC 11.58 x64 / x86
Everything 1.5.0.1417b (x64), Everything Toolbar 2.4.1
QAP 12.3 x64, Listary Pro 7.0.0.5 beta
User avatar
solid
Power Member
Power Member
Posts: 764
Joined: 2004-08-09, 11:20 UTC

Re: Add "9. External Viewer" to "Define view method by file type" in Lister (F3)

Post by *solid »

Horst.Epp wrote: 2026-05-16, 20:31 UTC Not with the TC Plugin Manager :)
It makes it easier, but not less cryptic.

The mere fact that it takes an external utility to configure the program says enough.
User avatar
Gral
Power Member
Power Member
Posts: 1786
Joined: 2005-01-26, 15:12 UTC

Re: Add "9. External Viewer" to "Define view method by file type" in Lister (F3)

Post by *Gral »

monarch-lfv wrote: 2026-05-16, 08:09 UTC 2zhugecaomao
I have a slightly different, but similar, proposal. At the very least, what you're asking for can be implemented using the old "Anycmd" plugin....
There is a Lister plugin created especially for such cases - AppLoader
IMO easier to configure, direct open external application. Just instead configure Lister, you can configure plugin.

P.S. 2 zhugecaomao
Just after writing this post did I see your post in another thread about the AppLoader plugin. But I support the request in this thread.
User avatar
zhugecaomao
Junior Member
Junior Member
Posts: 90
Joined: 2022-08-23, 05:08 UTC
Contact:

Re: Add "9. External Viewer" to "Define view method by file type" in Lister (F3)

Post by *zhugecaomao »

solid wrote: 2026-05-16, 20:11 UTC
It keeps consistency, expands the internal viewer capabilities, and can even merge the settings for internal and external viewers.

Configuring Lister is the most cryptic part of TC.
Yes, exactly
Total Commander 11.58 RC5 x64 #339325
Windows 11 Pro 25H2 x64
Everything 1.5b x64
Website | Github
Post Reply