Page 1 of 1

Loadlist from Command line

Posted: 2021-12-03, 11:13 UTC
by Horst.Epp
We have the LOADLIST command which is used for example in our Everything GUI script.
The usage would be much simpler if we had a TC command line switch like
/list=path_to_listname.txt
This would completely eliminate the need for an View mode and the Auto Switch Mode.
In general scripting and deliver results to TC will be much easier.

Re: Loadlist from Command line

Posted: 2021-12-03, 19:12 UTC
by hi5
+1

Re: Loadlist from Command line

Posted: 2021-12-03, 21:00 UTC
by jinsight
Support ++

Re: Loadlist from Command line

Posted: 2024-07-29, 11:23 UTC
by Stefan2
TC suggestions (English)
Support++

Could be like this:
Help > Command line parameters:     totalcmd.exe /load = <filename>
    Usage example:
      - 1) run an external script to gather the wanted items and save the result as text file to <"path\filename">
      - 2) at the end of that script, execute ( totalcmd.exe /load = <"path\filename"> ) to load the result in a "search results"-tab like LOADLIST does.


Info for others - the "LOADLIST <file>"-button command itself is already implemented since 2001:
History.txt wrote:10.03.21 Release Total Commander 10.00 public beta 1

01.11.20 Added: New internal command LOADLIST listfilename loads list of files/folders from text file.
There must be one name per line. If no path is provided, the current directory is assumed.
File details are retrieved automatically (32/64)

EDIT:
Info for others - "totalcmd.exe LOADLIST <file>"-command line option is implemented since 2022 too:
History.txt wrote:04.10.22 Release Total Commander 10.52 release candidate 1 (RC1)

30.09.22 Added: Command line parameters now support value LOADLIST:path\listfile.txt
instead of a directory name to load list file into file panel, like LOADLIST0 button bar command (no errors) (32/64)
For more info see posts below.

 

Re: Loadlist from Command line

Posted: 2024-07-29, 13:43 UTC
by tuska
Horst.Epp wrote: 2021-12-03, 11:13 UTC We have the LOADLIST command which is used for example in our Everything GUI script.
The usage would be much simpler if we had a TC command line switch like
/list=path_to_listname.txt
This would completely eliminate the need for an View mode and the Auto Switch Mode.
In general scripting and deliver results to TC will be much easier.
I (still) don't understand this suggestion.

To transfer search results from 'Everything' to Total Commander,
neither a 'View mode' nor an 'Auto Switch mode' are required.
In my opinion, it is sufficient to execute the compiled AHK script.

AHK-Script - Line  41  : DestinationFile = C:\totalcmd\EV-Results\EV-Results.txt (example!)
AHK-Script - Line 164  : Run %TotalCmd% /O /T /S LOADLIST:%DestinationFile%
Total Commander .....: %COMMANDER_EXE% /O /T /S LOADLIST:C:\totalcmd\EV-Results\EV-Results.txt

I subjected the compiled AHK script to a hard test test under various conditions - with the following result:
  1. Search query directly in 'Everything': files: (approx. 600,000 files)
  2. Compiled AHK script - name: SEND_EV-RESULTS_to_TC-panel_(A)_CloseEverything-0_TAB-Search_result_(A).exe
  3. After approx. 4 or 4.5 minutes I received this message, which caused a cancellation:
    Memory limit reached --- SEND_EV-RESULTS_to_TC-panel_(A)_CloseEverything-0_TAB-Search_result_(A).exe

    Code: Select all

    Error:  Memory limit reached (see #MaxMem in the help file).
    
    	Line#
    --->	124: fullContent .= full "
    "
    
    The current thread will exit.
    
    fullContent .= full "`n" ... is located in line 154 and not in line 124.
    The file "C:\totalcmd\EV-Results\EV-Results.txt" was written, but it contained 38 files instead of approx. 600,000 files.
     
  4. RAM consumption: max 28%
A search query directly in 'Everything' and transferring the result to Total Commander with the same AHK script
with approx. 40,000 files and 5,500 folders takes only a few seconds.
Approx. 200,000 files and approx. 20,000 folders were also transferred without any problems (approx. 1.5 minutes) from EV to TC.

For comparison, a search query in Total Commander using 'Everything':
  1. ev:files: (approx. 600,000 files)
    Approx. 1 minute, 40 seconds until the result is displayed in Total Commander (not cached!).
  2. Button "Feed to listbox": Approx. 25 seconds until the result has been transferred.
  3. RAM consumption: max 26%
Windows 11 Pro (x64) Version 23H2 (OS Build 22631.3958) - Latest revision date: 2024-07-25
https://aka.ms/Windows11/ReleaseInfo
; https://learn.microsoft.com/en-us/windows/release-health/windows11-release-information

Code: Select all

Sources	 		msinfo32.exe (System Information), Windows logo key + Pause key (System > About), Search: winver[.exe]
.
OS Name			Microsoft Windows 11 Pro
Version			10.0.22631 OS Build 22631
Processor		Intel(R) Core(TM) i5-12600K 12th Gen, 3.70 GHz, 10 Cores, 16 Logical Processors
Installed RAM		32.0 GB (22.9 GB usable)
System type		64-bit operating system, x64-based processor

Edition			Windows 11 Pro
Version			23H2
Installed on		05/10/2022
OS Build			22631.3958
Experience		Windows Feature Experience Pack 1000.22700.1026.0
____________________________________________________
Total Commander 11.03 (x64) | Everything 1.5.0.1383a (x64)

Re: Loadlist from Command line

Posted: 2024-07-29, 14:10 UTC
by Horst.Epp
tuska wrote: 2024-07-29, 13:43 UTC
Horst.Epp wrote: 2021-12-03, 11:13 UTC We have the LOADLIST command which is used for example in our Everything GUI script.
The usage would be much simpler if we had a TC command line switch like
/list=path_to_listname.txt
This would completely eliminate the need for an View mode and the Auto Switch Mode.
In general scripting and deliver results to TC will be much easier.
I (still) don't understand this suggestion.
2Tuska
I don't know why you refer to this old suggestion.
My suggestion for Loadlist from the command line was implemented a long time ago
and is used in the Everything GUI to TC script.

Re: Loadlist from Command line

Posted: 2024-07-29, 15:40 UTC
by Stefan2
 

Ahhh, now I think I understand that note?

Info for others - "totalcmd.exe LOADLIST <file>" is already implemented:
History.txt wrote:04.10.22 Release Total Commander 10.52 release candidate 1 (RC1)

30.09.22 Added: Command line parameters now support value LOADLIST:path\listfile.txt
instead of a directory name to load list file into file panel, like LOADLIST0 button bar command (no errors) (32/64)



Help > Command line parameters:

totalcmd.exe
    /L= Set path in left window
    /R= Set path right window




And since the above mentioned TC 10.52:

   totalcmd.exe /L=LOADLIST:<[path\)filename> ---: Load list of somehow collected items in left window
   totalcmd.exe /R=LOADLIST:<[path\)filename> ---: Load list of somehow collected items in right window
   totalcmd.exe /O /T /S LOADLIST:"c:\temp\list.txt" ---: /S Interprets the passed dirs as source/target
       instead of left/right (for usage with /O) -------: /T opens an new Tab

   totalcmd.exe /L=LOADLIST:"c:\temp\list.txt"

   totalcmd.exe /N /R=LOADLIST:c:\temp\list.txt
   totalcmd.exe /N /R=LOADLIST:"c:\t e m p\list no2.txt"
   totalcmd.exe /N /R="LOADLIST:c:\t e m p\list no3.txt"
   totalcmd.exe /N /S /R="LOADLIST:c:\temp\list.txt"

Just pure works too:
   totalcmd.exe LOADLIST:"c:\temp\list.txt"


This works like the internal command "LOADLIST >filename>" used as button-command for an already running TC.
totalcmd.inc" wrote:LOADLIST <filename>=-25;Load complete list (like search result) from file (supports modifier 0 = no error dialogs)



Am I right ? (should be better documented in History.txt and "Help > Command line parameters")


 

Re: Loadlist from Command line

Posted: 2024-07-29, 15:50 UTC
by Horst.Epp
2Stefan2
The AHK script uses this
Run %TotalCmd% /O /T /S LOADLIST:%DestinationFile%
So it refers to the TC source side, independent of left or right.

Re: Loadlist from Command line

Posted: 2024-07-29, 16:30 UTC
by Stefan2
Horst.Epp wrote: 2024-07-29, 15:50 UTC
Thanks :thumbsup:




 

Re: Loadlist from Command line

Posted: 2024-07-29, 17:09 UTC
by tuska
Horst.Epp wrote: 2024-07-29, 14:10 UTC 2Tuska
I don't know why you refer to this old suggestion.
My suggestion for Loadlist from the command line was implemented a long time ago
and is used in the Everything GUI to TC script.
I accidentally stepped on the ice here, sorry! :oops:

A note from you in the subject of the first post that the proposal has been resolved
would probably have been enough to avoid this. :wink:
_______________________________________________________________________________________
Open Everything GUI results with TC LOADLIST - AutoHotkey (.AHK) SCRIPT and GUIDANCE, discussions