[Feature Request]Import file list with the output of CLI
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 14
- Joined: 2021-04-30, 14:14 UTC
[Feature Request]Import file list with the output of CLI
It would be nice to have the following features: read the output of a CLI command as filenames(relative to current path/fullpath), and show only those commands.
Currently filelist within a text file in the search panel (textbox "Search In"), one tricky way to achieve above purpose is to run the command, for example which I use a lot is `rg -l sometext` and redirect the output to a text file and '@the filename' in the "search in" box, "search" and "Fill files in panel". However, since the text "sometext" changes everytime, it's very time-consuming.
As far as I'm concerning, if the "search in" in "Search panel" and the "command" on the main panel supports "!command"(borrow from VIM), and consequently,
1. Run the "command" to get the filenames, and search only in the results, (Search panel).
2. Run the "command" to get the filenames, and show only the results, (main panel) as if expand all and execute "cm_LoadSelectionFromFile", "cm_ShowOnlySelected", "cm_ClearAll" in a row.
I think it would be cool, and very nice to exploit some CLI commands.
Currently filelist within a text file in the search panel (textbox "Search In"), one tricky way to achieve above purpose is to run the command, for example which I use a lot is `rg -l sometext` and redirect the output to a text file and '@the filename' in the "search in" box, "search" and "Fill files in panel". However, since the text "sometext" changes everytime, it's very time-consuming.
As far as I'm concerning, if the "search in" in "Search panel" and the "command" on the main panel supports "!command"(borrow from VIM), and consequently,
1. Run the "command" to get the filenames, and search only in the results, (Search panel).
2. Run the "command" to get the filenames, and show only the results, (main panel) as if expand all and execute "cm_LoadSelectionFromFile", "cm_ShowOnlySelected", "cm_ClearAll" in a row.
I think it would be cool, and very nice to exploit some CLI commands.
Re: [Feature Request]Import file list with the output of CLI
In TC 10 you have the command LOADLIST which reads a list of files from a file
and displays it in the current side.
and displays it in the current side.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
-
- Junior Member
- Posts: 14
- Joined: 2021-04-30, 14:14 UTC
Re: [Feature Request]Import file list with the output of CLI
Yes, but still, some steps need: open command prompt, run the command and redirect to a temporary file, and at last delete the temporary file.Horst.Epp wrote: 2021-04-30, 15:36 UTC In TC 10 you have the command LOADLIST which reads a list of files from a file
and displays it in the current side.
If I shall repeat this action in different folders/query text, it's quite boring and finger tiring.
Re: [Feature Request]Import file list with the output of CLI
All of this steps can be made to run with the press of one button in TC.Troy_Daniel wrote: 2021-05-01, 06:53 UTCYes, but still, some steps need: open command prompt, run the command and redirect to a temporary file, and at last delete the temporary file.Horst.Epp wrote: 2021-04-30, 15:36 UTC In TC 10 you have the command LOADLIST which reads a list of files from a file
and displays it in the current side.
If I shall repeat this action in different folders/query text, it's quite boring and finger tiring.
Also why do you need deleting a temp file as in a normal procedure your script will always use the same name.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
-
- Junior Member
- Posts: 14
- Joined: 2021-04-30, 14:14 UTC
Re: [Feature Request]Import file list with the output of CLI
One button? I'm curious how to achieve that without the assisant of other scripts.Horst.Epp wrote: 2021-05-01, 08:17 UTCAll of this steps can be made to run with the press of one button in TC.Troy_Daniel wrote: 2021-05-01, 06:53 UTCYes, but still, some steps need: open command prompt, run the command and redirect to a temporary file, and at last delete the temporary file.Horst.Epp wrote: 2021-04-30, 15:36 UTC In TC 10 you have the command LOADLIST which reads a list of files from a file
and displays it in the current side.
If I shall repeat this action in different folders/query text, it's quite boring and finger tiring.
Also why do you need deleting a temp file as in a normal procedure your script will always use the same name.
Noting that, the text to grep and the folder where to grep in change every once in a while.
A more realistic example is, for the folder structure,
--------------------
+ root folder
+ FolderA
+ files1
+ ...
+ FolderB
+ files2
+ ...
--------------------
1. grep text "hello" in FolderA, manipulate the resulting files;
2. grep text "example" in FolderB, and mainupate the resulting files.
I cannot come up with any ideas to finish the above tasks with one button except for typing the keywords(hello/example).
Any more detailed illustrations?
Re: [Feature Request]Import file list with the output of CLI
The folder to handle should be selected in TC and will be given as parameters to your script.
A button can have a ? in the parameter field which allows to enter your search text for example.
This is made with a button asking a text to search for and starting an em_command which executes your script.
You can chain commands in a button so the next command after executing your script is a LOADLIST
which let TC display the file which was created by your script.
A button can have a ? in the parameter field which allows to enter your search text for example.
This is made with a button asking a text to search for and starting an em_command which executes your script.
You can chain commands in a button so the next command after executing your script is a LOADLIST
which let TC display the file which was created by your script.
Windows 11 Home, Version 24H2 (OS Build 26100.4061)
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
TC 11.55 RC2 x64 / x86
Everything 1.5.0.1391a (x64), Everything Toolbar 1.5.2.0, Listary Pro 6.3.2.88
QAP 11.6.4.4 x64
-
- Junior Member
- Posts: 14
- Joined: 2021-04-30, 14:14 UTC
Re: [Feature Request]Import file list with the output of CLI
Thank for your patience, and it is really helpful.Horst.Epp wrote: 2021-05-01, 12:02 UTC The folder to handle should be selected in TC and will be given as parameters to your script.
A button can have a ? in the parameter field which allows to enter your search text for example.
This is made with a button asking a text to search for and starting an em_command which executes your script.
You can chain commands in a button so the next command after executing your script is a LOADLIST
which let TC display the file which was created by your script.
But if it is appreciated if the command-filter be added for convience.
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Re: [Feature Request]Import file list with the output of CLI
Hello! Your remarks and pieces of advice are really inspiring. However, what I would be most happy to learn is how to have files listed in a txt file displayed in a panel using a command line option, provided that this is at all possible. Your advice will be greatly appreciated. Regards Marek
-
- Junior Member
- Posts: 14
- Joined: 2021-04-30, 14:14 UTC
Re: [Feature Request]Import file list with the output of CLI
I searched the help manual, but am frustrated to find that, no.MarekCzerski wrote: 2021-08-19, 21:14 UTC Hello! Your remarks and pieces of advice are really inspiring. However, what I would be most happy to learn is how to have files listed in a txt file displayed in a panel using a command line option, provided that this is at all possible. Your advice will be greatly appreciated. Regards Marek
There aren't any options to load a filelist in the command line switches. You can check it under [Configuration and Switches/Command line parameters].
But if you can just use loadlist <filename> after you open TC. Posssibly, totalcmd /o /l=<filename>, and then run
[em_load_selected]
cmd=loadlist
param=%P%N
Hope it helps.
-
- Junior Member
- Posts: 27
- Joined: 2015-01-22, 01:18 UTC
Re: [Feature Request]Import file list with the output of CLI
Thanks Troy, I will definitely use your advice and if it occurs successful, I will get back here again to share my experience.
Best regards, Marek
Best regards, Marek