LOADLIST sort order if invoked from Auto switch mode
Moderators: Hacker, petermad, Stefan2, white
Re: LOADLIST sort order if invoked from Auto switch mode
I don't know what the reason is, but the hit rate for 10 - 15 attempts with cm_ExchangeSelBoth is currently
at one hit each, e.g. with TC 10.51 x64 and x86 (have tested the previous versions again -
with Auto Switch Mode and View Mode ... "LOADLIST %COMMANDER_PATH%\EV-Results\EV-Results.txt").
All other attempts only showed the files (and not additionally the 2 folders) in the footer of TC.
So I am stopping the tests for the time being.
at one hit each, e.g. with TC 10.51 x64 and x86 (have tested the previous versions again -
with Auto Switch Mode and View Mode ... "LOADLIST %COMMANDER_PATH%\EV-Results\EV-Results.txt").
All other attempts only showed the files (and not additionally the 2 folders) in the footer of TC.
So I am stopping the tests for the time being.
Re: LOADLIST sort order if invoked from Auto switch mode
I have now been able to localise the problem.
Please excuse my previously expressed misconceptions.
Only if the menu item "Mix Files and Folders" is active in Everything 1.5, i.e. ticked (Menu "View" > Sort by > Mix Files and Folders)
the error occurs with command: cm_ExchangeSelBoth! I.e. the LOADLIST command works perfectly!
The search result of Everything is properly transferred 1:1 to Total Commander via AHK script on a separate tab in TC,
i.e. the displayed sorting in Total Commander is OK (with -OR- without "Mix Files and Folders" in Everything)!
If you press the button with the command: cm_ExchangeSelBoth in TC after receiving the search result
(in Everything: "Mix Files and Folders" checked!),
then ONLY FILES are displayed in the status bar of Total Commander, although FOLDERS are also present in the search result!
If you switch OFF the option "Mix Files and Folders" in Everything, then with command: cm_ExchangeSelBoth
both the number of files and the folders are displayed in the status bar of TC!
As described, this can be reproduced with both AHK scripts, i.e.
1. AHK-Skript vom 21.10.2021 - Line 164: Run %TotalCmd% /O /T /S %DestinationDir% ............ (WITH View Mode & Auto Switch Mode)
2. AHK-Skript vom 04.10.2022 - Line 164: Run %TotalCmd% /O /T /S LOADLIST:%DestinationFile% (NEW!) - (WITHOUT Auto Switch Mode)
I have posted the AHK script dated 4.10.2022 here.
2Horst.Epp
Can you please update your description here? (Point 2., 3.?)
Windows 11 Pro (x64) Version 22H2 (OS build 22621.608) | TC 10.52RC1 x64 | 'Everything' 1.5.0.1321a (x64)
Open Everything GUI results with TC LOADLIST - AutoHotkey (.AHK) SCRIPT and GUIDANCE, discussions
Transfer 'Everything' GUI results to Total Commander - STEP-BY-STEP GUIDE, summary - Status: AHK script dated 21.10.2021
Please excuse my previously expressed misconceptions.

Only if the menu item "Mix Files and Folders" is active in Everything 1.5, i.e. ticked (Menu "View" > Sort by > Mix Files and Folders)
the error occurs with command: cm_ExchangeSelBoth! I.e. the LOADLIST command works perfectly!
The search result of Everything is properly transferred 1:1 to Total Commander via AHK script on a separate tab in TC,
i.e. the displayed sorting in Total Commander is OK (with -OR- without "Mix Files and Folders" in Everything)!
If you press the button with the command: cm_ExchangeSelBoth in TC after receiving the search result
(in Everything: "Mix Files and Folders" checked!),
then ONLY FILES are displayed in the status bar of Total Commander, although FOLDERS are also present in the search result!
If you switch OFF the option "Mix Files and Folders" in Everything, then with command: cm_ExchangeSelBoth
both the number of files and the folders are displayed in the status bar of TC!
As described, this can be reproduced with both AHK scripts, i.e.
1. AHK-Skript vom 21.10.2021 - Line 164: Run %TotalCmd% /O /T /S %DestinationDir% ............ (WITH View Mode & Auto Switch Mode)
2. AHK-Skript vom 04.10.2022 - Line 164: Run %TotalCmd% /O /T /S LOADLIST:%DestinationFile% (NEW!) - (WITHOUT Auto Switch Mode)
I have posted the AHK script dated 4.10.2022 here.
- The paths in lines 41, 46 and 47 must be adapted if necessary. ...
- In line 41 you have to specify in which file the search result should be saved.
It is highly recommended to create a separate folder(!). Example: C:\totalcmd\EV-Results\EV-Results.txt - Line 164 could theoretically be adapted as well - but leave it unchanged for this purpose!
- Otherwise NO FURTHER CHANGES are to be made in the AHK script!
- Compile the AHK script - create an .EXE file
- Double-click on the .EXE file -> an .INI file with the same name will be created automatically
- Double-click on the .INI file and check the paths in lines 15, 20 and 21 again to be sure
- Set this option in Everything 1.5: Menu "View" > Sort by > Mix Files and Folders (must be ticked!)
- Perform a search in Everything 1.5 - there should be FILES and FOLDERS in the search result
- Leave the window in Everything OPEN and switch to Total Commander.
- Double click in Total Commander on the compiled AHK script - the .EXE file (... or on a button ...)
- The search result has been transferred from Everything to Total Commander and is displayed there on the tab "Search result:"
- Now enter on the TC command line the command: cm_ExchangeSelBoth and press ENTER (or create a button...)
- In the status line of Total Commander ONLY the number of files is displayed as a result, instead of files AND folders.
This is exactly the error!
2Horst.Epp
Can you please update your description here? (Point 2., 3.?)
Windows 11 Pro (x64) Version 22H2 (OS build 22621.608) | TC 10.52RC1 x64 | 'Everything' 1.5.0.1321a (x64)
Open Everything GUI results with TC LOADLIST - AutoHotkey (.AHK) SCRIPT and GUIDANCE, discussions
Transfer 'Everything' GUI results to Total Commander - STEP-BY-STEP GUIDE, summary - Status: AHK script dated 21.10.2021
Re: LOADLIST sort order if invoked from Auto switch mode
The results from the automatic view after running the AHK are ok, they contain files and folders.
Using now the command cm_ExchangeSelBoth still shows all files and folders in the list
but counts only the files.
So the problem is with the command cm_ExchangeSelBoth while showing a Loadlist result.
I have updated my description and further simplified it.
There is no need for a special view, as the default branch view can be used.
Using now the command cm_ExchangeSelBoth still shows all files and folders in the list
but counts only the files.
So the problem is with the command cm_ExchangeSelBoth while showing a Loadlist result.
I have updated my description and further simplified it.
There is no need for a special view, as the default branch view can be used.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: LOADLIST sort order if invoked from Auto switch mode
These are the results I get (settings shortened):
EDIT: Addition...
Code: Select all
View Mode + Auto Switch Mode .....: em_LOAD_EV-Results,cm_ExchangeSelBoth ) Number of FILES only
cm_ExchangeSelBoth - automatically: )
em_LOAD_EV-Results: LOADLIST %COMMANDER_PATH%\EV-Results\EV-Results.txt )
AHK-script .......: Run %TotalCmd% /O /T /S %DestinationDir% )
------------------------------------------------------------------------------------------------------
View Mode + Auto Switch Mode .....: em_LOAD_EV-Results > Number of FILES only
cm_ExchangeSelBoth - manually ....: >
em_LOAD_EV-Results: LOADLIST %COMMANDER_PATH%\EV-Results\EV-Results.txt >
AHK-script .......: Run %TotalCmd% /O /T /S %DestinationDir% >
------------------------------------------------------------------------------------------------------
*** WITHOUT *** Auto Switch Mode .: | Number of FILES only
cm_ExchangeSelBoth - manually ....: |
AHK-script .......: Run %TotalCmd% /O /T /S LOADLIST:%DestinationFile% |
Code: Select all
Button with command: %COMMANDER_EXE% /O /T /S LOADLIST:C:\totalcmd\EV-Results\EV-Results.txt (Auto Switch Mode: ON/OFF)
Everything: View - Sort by - ✅ Mix Files and Folders }
cm_ExchangeSelBoth - manually ....: } Number of FILES only
------------------------------------------------------------------------------------------------------------------------
Everything: View - Sort by - Mix Files and Folders: OFF(!) {
cm_ExchangeSelBoth - manually ....: { Number of FILES and FOLDERS
Last edited by tuska on 2022-10-07, 12:22 UTC, edited 1 time in total.
Re: LOADLIST sort order if invoked from Auto switch mode
Regarding point 3. in description:
- "3. Create an Auto Switch mode..." Why? This is no longer necessary with the latest script.
- There are 2 points "3." (06.10.2022 20:15)
Users' wishes are different.Horst.Epp wrote: 2022-10-06, 18:02 UTC There is no need for a special view, as the default branch view can be used.
My wish is to have control over whether the search results from Everything arrive in TC in their entirety.
Another user might want a completely different presentation of the search results.
Re: LOADLIST sort order if invoked from Auto switch mode
For me it is necessary as I want to display the results in Branch view and not as a simple list.tuska wrote: 2022-10-06, 22:55 UTCRegarding point 3. in description:
- "3. Create an Auto Switch mode..." Why? This is no longer necessary with the latest script.
Believe me or not but this is the better display for this type of list.
You are free to customize

Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: LOADLIST sort order if invoked from Auto switch mode
Can we please continue the topic "Branch view" here.Horst.Epp wrote: 2022-10-07, 06:25 UTCFor me it is necessary as I want to display the results in Branch view and not as a simple list.tuska wrote: 2022-10-06, 22:55 UTCRegarding point 3. in description:
- "3. Create an Auto Switch mode..." Why? This is no longer necessary with the latest script.
That fits better there than here in the Bug Forum.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: LOADLIST sort order if invoked from Auto switch mode
So is there anything I need to change on the side of Total Commander?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: LOADLIST sort order if invoked from Auto switch mode
Yes, it looks like there is an error with the command cm_ExchangeSelBothghisler(Author) wrote: 2022-10-07, 16:41 UTC So is there anything I need to change on the side of Total Commander?
which Tuska uses to see the number of files and dirs in the display after a Loadlist.
If Loadlist opens a file with dirs and files cm_ExchangeSelBoth
only shows the number of files and ignores the dirs while in a Branch view.
Currently cm_ExchangeSelBoth works fine for me, I can't reproduce this error.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
TC 11.51 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.2.1 x64
Re: LOADLIST sort order if invoked from Auto switch mode
Here is my video, which shows the error:
- File: _2022-10-07_23.28.55_Video_30.000_1920x1140_00.03.52.wmv
- File size: ~17 MB
- Duration: Approx. 4 minutes
- Everything 1.5 - Mix Files and Folders
- TC LOADLIST
View mode "EV-Results": em_LOAD_EV-Results,cm_ExchangeSelBoth ... and Auto Switch Mode: %COMMANDER_PATH%\EV-Results\)
em_LOAD_EV-Results: LOADLIST %COMMANDER_PATH%\EV-Results\EV-Results.txt
AHK script 21.10.2021 - line 164: Run %TotalCmd% /O /T /S %DestinationDir%
- OR - - AHK Script 04.10.2022 - Line 164: Run %TotalCmd% /O /T /S LOADLIST:%DestinationFile%
Without View mode, Auto Switch Mode - TC cm_ExchangeSelBoth
- File: _2022-10-07_23.28.55_Video_30.000_1920x1140_00.03.52.wmv
- File size: ~17 MB
- Duration: Approx. 4 minutes
Re: LOADLIST sort order if invoked from Auto switch mode
Change in this topic:
If you set a View mode with built-in custom columns view (!) + Auto Switch Mode, then cm_ExchangeSelBoth works!
I.e. after transfer, both folders and files are displayed in the status bar of TC automatically.
That is why Horst.Epp could not find any error in this regard.
But there was a problem shift:
If "Mix Files and Folders" is set in Everything 1.5, then after transferring the search result, the SORTS are not taken into account
in Total Commander, i.e. the folders are displayed at the top and the files below.
In the file "C:\totalcmd\EV-Results\EV-Results.txt" the sorting is according to "Mix Files and Folders" in Everything 1.5.
If I look at this file with:
then I see that the "export" has taken place correctly.
If I now click on the button with the command: cm_ExchangeSelBoth then only files are displayed again
in the status bar of Total Commander, instead of folders and files (Everything 1.5: Mix Files and Folders - TICKED!).
Example:
If you set a View mode with built-in custom columns view (!) + Auto Switch Mode, then cm_ExchangeSelBoth works!
I.e. after transfer, both folders and files are displayed in the status bar of TC automatically.
That is why Horst.Epp could not find any error in this regard.
But there was a problem shift:
If "Mix Files and Folders" is set in Everything 1.5, then after transferring the search result, the SORTS are not taken into account
in Total Commander, i.e. the folders are displayed at the top and the files below.
In the file "C:\totalcmd\EV-Results\EV-Results.txt" the sorting is according to "Mix Files and Folders" in Everything 1.5.
If I look at this file with:
Code: Select all
%COMMANDER_EXE% /O /T /S LOADLIST:C:\totalcmd\EV-Results\EV-Results.txt
If I now click on the button with the command: cm_ExchangeSelBoth then only files are displayed again
in the status bar of Total Commander, instead of folders and files (Everything 1.5: Mix Files and Folders - TICKED!).
Example:
EV-Results.txt - 2 Folders (Help, Language) with backslash at the end, 17 files
Code: Select all
C:\totalcmd\Plugins\NTFS-Links\_2013-12-21_212738_Symlink-Hilfe-Windows7_Laufwerk-D.png
C:\totalcmd\Plugins\NTFS-Links\_2013-12-21_221747.png
C:\totalcmd\Plugins\NTFS-Links\_Hardlinks_2011 07 17_224912_siehe CUEcard!!.lnk
C:\totalcmd\Plugins\NTFS-Links\_Hardlinks_Mehrfachsynchronisation.lnk
C:\totalcmd\Plugins\NTFS-Links\_ntlinks-Downloadseite.url
C:\totalcmd\Plugins\NTFS-Links\descript.ion
C:\totalcmd\Plugins\NTFS-Links\Hardlinks.lnk
C:\totalcmd\Plugins\NTFS-Links\Hardlinks_TC-Plugin_NTFS Links 1.30.png.lnk
C:\totalcmd\Plugins\NTFS-Links\Help\
C:\totalcmd\Plugins\NTFS-Links\Language\
C:\totalcmd\Plugins\NTFS-Links\Language\LNG_descript.txt
C:\totalcmd\Plugins\NTFS-Links\Language\NL_deu.lng
C:\totalcmd\Plugins\NTFS-Links\Help\NL_eng.chm
C:\totalcmd\Plugins\NTFS-Links\NL_eng.ini
C:\totalcmd\Plugins\NTFS-Links\Language\NL_eng.lng
C:\totalcmd\Plugins\NTFS-Links\NTFS-Hardlinks.ini
C:\totalcmd\Plugins\NTFS-Links\NtfsLinks.exe
C:\totalcmd\Plugins\NTFS-Links\util_ntfslinks_x32_1.30.rar
C:\totalcmd\Plugins\NTFS-Links\util_ntfslinks_x64_1.30.rar
Re: LOADLIST sort order if invoked from Auto switch mode
Example:
Please note the instructions for the AHK script under point 1. - 9.
View mode with integrated 'Custom columns view' and Auto Switch Mode EDIT: NOT required!
Please note the instructions for the AHK script under point 1. - 9.
BUTTON
Before executing the BUTTON, it is recommended to call the cm_SwitchHidSys command.
Code: Select all
TOTALCMD#BAR#DATA
cm_SrcViewModeList Branch_View
%COMMANDER_PATH%\Tools\AutoHotkey\AutoHotkey.exe
AHK script 4.10.2022 || cm_SrcViewModeList Branch_View|Columns view: 37 Pfad || Sort order: Unchanged|Auto-run commands: em_EV-results_TC-LOADLIST,CM_WAIT 750,cm_SrcCustomView37,cm_ExchangeSelBoth|em_EV-results_TC-LOADLIST: Compiled_AHK_Script_04-10-2022.exe
-1
- View Mode - Name: <Default>:
- Columns view: Full
- Sort order: Name
- View Mode - Name: Branch_View
- Columns view: 37 Pfad (## Custom columns view) ... [=tc.size], [=tc.writedate], [=tc.attributestr], [=tc.path]
- Sort order: Unchanged
- Auto-run commands: em_EV-results_TC-LOADLIST,CM_WAIT 750,cm_SrcCustomView37,cm_ExchangeSelBoth
- em_EV-results_TC-LOADLIST -> C:\totalcmd\Tools\AutoHotkey\Skripte\Compiled_AHK_Script_04-10-2022.exe
usercmd.iniCode: Select all
[em_EV-results_TC-LOADLIST] cmd=C:\totalcmd\Tools\AutoHotkey\Skripte\Compiled_AHK_Script_04-10-2022.exe
- CM_WAIT 750 -> CM_WAIT <time> Wait x milliseconds
- cm_SrcCustomView37 -> calls up the user-defined custom columns view no. xx, e.g. 37 Pfad (=Path)
- cm_ExchangeSelBoth -> cm_ExchangeSelBoth 3321 Invert selection (files+folders)
- Auto Switch Mode -> EDIT: NOT required!
Automatically switch view mode on directory change:
- Rule: +: Must match ... Directory: %COMMANDER_PATH%\EV-Results\
- Set this mode: Branch_View
- Create folder: "EV-Results" -> e.g. %COMMANDER_PATH%\EV-Results\ ... C:\totalcmd\EV-Results\
Last edited by tuska on 2022-10-09, 18:21 UTC, edited 1 time in total.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: LOADLIST sort order if invoked from Auto switch mode
cm_ExchangeSelFiles/cm_ExchangeSelFolders/cm_ExchangeSelBoth cannot not handle folders shown below files because they are optimized to lists where files are always shown below folders.
Also the function which counts file and folders is also optimized to lists where files are always shown below folders. You will see the same problem when using LOADLIST with a mixed list and then selecting folders manually. I will change it - it will change it to handle mixed lists in lists loaded via LOADLIST.
Also the function which counts file and folders is also optimized to lists where files are always shown below folders. You will see the same problem when using LOADLIST with a mixed list and then selecting folders manually. I will change it - it will change it to handle mixed lists in lists loaded via LOADLIST.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: LOADLIST sort order if invoked from Auto switch mode
2ghisler(Author)
Thank you very much for your efforts!

When using a View mode with integrated Custom columns view (!), the SORTING problem still occurs (-> Everything 1.5: "Mix Files and Folders").
I.e. the folders are displayed at the top in this case, although they are in the middle in terms of sorting, for example.
Please see test cases 1 and 5 (AHK scripts differs only by 1 line!).
Please check!
I have tested the following: "Transfer 'Everything' GUI results to Total Commander"... "NOK" means "not OK".
2Horst.Epp
For your information:
Only a View mode and NO Auto Switch Mode is required (appropriate parameterization in the "Auto-run commands" field provided).
This applies at least to the examples given here.
Thank you very much for your efforts!

This is fixed in TC 10.52RC2!HISTORY.TXT wrote: 10.10.22 Release Total Commander 10.52 release candidate 2 (RC2)
09.10.22 Fixed: The footer wouldn't show the number of selected/total folders if they were shown below files, e.g. after using LOADLIST (32/64)

This is fixed in TC 10.52RC2!HISTORY.TXT wrote: 10.10.22 Release Total Commander 10.52 release candidate 2 (RC2)
09.10.22 Fixed: cm_ExchangeSelFiles/cm_ExchangeSelFolders/cm_ExchangeSelBoth did not handle folders shown below files,
e.g. after using LOADLIST (32/64)

When using a View mode with integrated Custom columns view (!), the SORTING problem still occurs (-> Everything 1.5: "Mix Files and Folders").
I.e. the folders are displayed at the top in this case, although they are in the middle in terms of sorting, for example.
Please see test cases 1 and 5 (AHK scripts differs only by 1 line!).
Please check!
I have tested the following: "Transfer 'Everything' GUI results to Total Commander"... "NOK" means "not OK".
Code: Select all
0 Everything 1.5.0.1321a (x64) ........................................ Menu "View" > Sort by > Mix Files and Folders: Yes / No
-------------------------------------------------------------------------------------------------------------------------------
Script 04.10.22 | View mode | Col.view: with/without | cm_-Commands | LOADLIST | TC-SORT | TC-Footer | EV: Mix F&F - Yes / No
1 - Button 1 | View mode | x – | x *) | OK | NOK! | OK | x –
2 - Button 1 | View mode | x – | – | OK | OK | OK | – x
3 - Button 2 | View mode | – x | x *) | OK | OK | OK | x –
4 - Button 2 | View mode | – x | – | OK | OK | OK | – x
-------------------------------------------------------------------------------------------------------------------------------
Code: Select all
Script 21.10.21 | View mode | Col.view: with/without | cm_-Commands | LOADLIST | TC-SORT | TC-Footer | EV: Mix F&F - Yes / No
5 - Button 3 | View mode | x – | – | OK | NOK! | OK | x –
6 - Button 3 | View mode | x – | – | OK | OK | OK | – x
-------------------------------------------------------------------------------------------------------------------------------
7 %COMMANDER_EXE% /O /T /S LOADLIST:C:\totalcmd\EV-Results\EV-Results.txt: OK
-------------------------------------------------------------------------------------------------------------------------------
*) cm_ - Commands
8 cm_ExchangeSelBoth 3321 Invert selection (files+folders): OK <-- <Default> for my purposes
9 cm_ExchangeSelFiles 3322 Invert selection (files) .......: OK
0 cm_ExchangeSelFolders 3323 Invert selection (folders) .....: OK
For your information:
Only a View mode and NO Auto Switch Mode is required (appropriate parameterization in the "Auto-run commands" field provided).
This applies at least to the examples given here.
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: LOADLIST sort order if invoked from Auto switch mode
Unfortunately switching to custom columns forces a re-sort. This is necessary because custom columns can only be sorted by the columns they show, plus size and date/time. I could leave the sort order the same and not mark any headers as pressed/down, but I fear that it could confuse users. It would affect also all search results. The only exception is the duplicate file finder: Here I added code that the results aren't lost when switching to a different custom columns view.When using a View mode with integrated Custom columns view (!), the SORTING problem still occurs
Maybe I can handle it as a special case only for a view mode where the sort order is set to "unchanged".
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com