Selection from a buffer or file does not work.

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

User avatar
MARK2580
Junior Member
Junior Member
Posts: 43
Joined: 2016-07-01, 07:31 UTC
Location: Russia. Kirov

Selection from a buffer or file does not work.

Post by *MARK2580 »

I do not know for sure a bug or a "feature". In general, for example, I'm looking for certain files. They are located in different folders.
I have a list of files I need.
I run a search and for example enter * .dds into the query, find all dds files and click to display them on the panel. I get on one of the panels all the files existing in the folders.
Next, I try to select files from the clipboard or load a list from a file, but nothing happens. :(
Selection does not work even if you enable displaying files without folders.
Win 10x64 / TC 11.01 x64 / Ryzen 5 3600 / GTX 3060 12gb / 32gb RAM
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48005
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Selection from a buffer or file does not work.

Post by *ghisler(Author) »

How did you create the list of selected files? Does it contain full path+names, or just the names?
Author of Total Commander
https://www.ghisler.com
User avatar
MARK2580
Junior Member
Junior Member
Posts: 43
Joined: 2016-07-01, 07:31 UTC
Location: Russia. Kirov

Re: Selection from a buffer or file does not work.

Post by *MARK2580 »

ghisler(Author) wrote: 2021-03-01, 16:29 UTC How did you create the list of selected files? Does it contain full path+names, or just the names?
This feature works if you are in a specific folder, but not in the search results or in no folders mode.
I have no idea where these files are located. My task is to find them.
To begin with, I tried to find all dds and already in the search results select the necessary names. Then I tried it in the mode without folders, but it didn't help either.
Spoiler

Code: Select all

SS_E2Maisonoffwall.dds
tl_ss_E2_Maison_floor1.dds
ss_e2maisontiles.dds
tl_ss_E2_Maison_wall3c.dds
ss_e2maisonwall1b.dds
tl_ss_E2_Maison_wall3b.dds
tl_ss_e2_maison_wc_tiles.dds
tl_e2_maison_wall_amber.dds
tl_ss_E2_Maison_marble.dds
SS_E2Maisoncarpet.dds
tl_E2_Maison_stairs.dds
ss_e2maisonwall3c.dds
tl_ss_e2_maison_wc_tiles2.dds
tl_ss_E2_Maison_carpet3.dds
SS_whitebrick.dds
ss_e2maisonwall3e.dds
ss_concreteblend3c.dds
tl_ss_E2_Maison_shuttertl_ss_e2_maison_shutter_a.dds
tl_E2_Maison_lamp_floor.dds
ab_sop_door2.dds
tl_e2_maison_doorframe_black.dds
SS_steel2.dds
ss_lighttemp.dds
Win 10x64 / TC 11.01 x64 / Ryzen 5 3600 / GTX 3060 12gb / 32gb RAM
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Selection from a buffer or file does not work.

Post by *petermad »

2MARK2580
Hmm, what do you mean by: "the no folders mode" and "the mode without folders"?
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Selection from a buffer or file does not work.

Post by *petermad »

2MARK2580
You have to use the clipboard to save and retrieve the files, since you need full path when in the Search listbox.

So use the command cm_CopyFullNamesToClip to save the selection, and use the command cm_LoadSelectionFromClip to load the selection again.

The functions cm_SaveSelection and cm_SaveSelectionToFile does NOT save the full path, hence cannot be used in the Search listbox (and in Branch view if the saved selection is not for files in the "root" of the Branch view).

If you want to copy filenames including full path to a file you can use this em_command:

Code: Select all

[em_copynamestofile]
cmd=%COMSPEC% /C
param=if exist "%P" copy "%WL" "%PSELECTEDFILES.txt"
menu=Copy selected filenames with full path to file SELECTEDFILES.txt in current folder (Unicode)
iconic=1
And then later retrieve the selection with this em_command:

Code: Select all

[em_loadselection]
cmd=LOADSELECTION
param="%PSELECTEDFILES.txt"
menu=Get file names from the file SELECTEDFILES.txt
or you can use the cm_LoadSelectionFromFile command to navigate to the file and load the selection from it.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MARK2580
Junior Member
Junior Member
Posts: 43
Joined: 2016-07-01, 07:31 UTC
Location: Russia. Kirov

Re: Selection from a buffer or file does not work.

Post by *MARK2580 »

I have already been offered an interesting solution that even works in search results.

Code: Select all

TOTALCMD#BAR#DATA
SELECTFILEST
%Z%S
wcmicons.dll,86
Works if there is a list of names on the clipboard. Sounds like your 2nd option =)
Honestly, I did not take into account that the search results are not just names with an extension, but a whole line with the path to these files ... Most likely, yes, because of this, it is impossible to select. Although the button described above can do this.
Win 10x64 / TC 11.01 x64 / Ryzen 5 3600 / GTX 3060 12gb / 32gb RAM
User avatar
MARK2580
Junior Member
Junior Member
Posts: 43
Joined: 2016-07-01, 07:31 UTC
Location: Russia. Kirov

Re: Selection from a buffer or file does not work.

Post by *MARK2580 »

2petermad
I read your message again... The problem is that I do not know the full paths to the files. I only have a list of names. And the files themselves are in a folder where there are about 30 more different folders.
My task is to find the desired names in the folder/subfolders and copy them wherever I need.
Win 10x64 / TC 11.01 x64 / Ryzen 5 3600 / GTX 3060 12gb / 32gb RAM
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Selection from a buffer or file does not work.

Post by *Horst.Epp »

MARK2580 wrote: 2021-03-03, 13:51 UTC 2petermad
I read your message again... The problem is that I do not know the full paths to the files. I only have a list of names. And the files themselves are in a folder where there are about 30 more different folders.
My task is to find the desired names in the folder/subfolders and copy them wherever I need.
If the list of names is not to long it can be used with an Eveything search in TC like this:
ev:filelist:name.ext|name2.ext|name3.exe|...
So the format of the list is names seperated by a |
This will find the names on every place in your system and list them with full path.
This list can then be feed to the listbox and so on.
If your file list is not formated like this it should be no problem to build it from other formats with a script
and store them in the clipboard for usage in the search.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
petermad
Power Member
Power Member
Posts: 14700
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Selection from a buffer or file does not work.

Post by *petermad »

2MARK2580
How many filenames are there typically in that list - if it not too many, you can just edit the list to one long line with each filename separated ny space and put that oneline list in the Search for field in the Search dialog.

IIRC the search field can be 32767 characters long.
Last edited by petermad on 2021-03-03, 20:55 UTC, edited 1 time in total.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MARK2580
Junior Member
Junior Member
Posts: 43
Joined: 2016-07-01, 07:31 UTC
Location: Russia. Kirov

Re: Selection from a buffer or file does not work.

Post by *MARK2580 »

Horst.Epp wrote: 2021-03-03, 14:24 UTC If the list of names is not to long it can be used with an Eveything search in TC like this:
ev:filelist:name.ext|name2.ext|name3.exe|...
I tried installing "Everything" and did not understand its usefulness at all. The search did not work faster, it did not become more convenient.
petermad wrote: 2021-03-03, 18:01 UTC How many filenames are there typically in that list - if it not too many, you can just edit the list to one long line with each filename separated ny space and put that oneline list in the Search for field in the Search dialog.
IIRC the search filed can be 32767 characters long.
I have already published the list above which I need to look for. -> viewtopic.php?p=397084#p397084

Basically there are about 32-40 files and each can have a very long name, for example -> tl_ss_e2_maison_shuttertl_ss_e2_maison_shutter_a.dds
I know that I can write them all in a row separated by a space, but most often, after painfully lining them up in a row and inserting them into the search field, I get a banal error or nothing at all. It is also very long and inconvenient to insert 4-5 names.

On the Russian forum, I was offered to do this:
1.in one panel, generate fake files from my list
2.in the second panel, open the search results (in my case, dds files
3.In the panel with fake files, select all of them
4. press the button with this code...

Code: Select all

TOTALCMD#BAR#DATA
SELECTFILEST
%Z%S
Oddly enough, it works and is faster than building a long list and inserting it into the search field.
Win 10x64 / TC 11.01 x64 / Ryzen 5 3600 / GTX 3060 12gb / 32gb RAM
User avatar
tuska
Power Member
Power Member
Posts: 3733
Joined: 2007-05-21, 12:17 UTC

Re: Selection from a buffer or file does not work.

Post by *tuska »

2MARK2580
You should get the results with Tool 'Everything' in real time.

'Everything' - settings (with pictures!): (also see my signature...)
Menu "Tools" -> Options... -> General:

Code: Select all

[✓] Start Everything on system startup
[ ] Run as administrator
[✓] Everything Service
Instructions and settings for searching in a list - directly in 'Everything': (see also the spoiler below for more details...)
Search for an ORed list of searches

Code: Select all

'Everything'
Example2: https://www.voidtools.com/forum/viewtopic.php?p=24413#p24413 
	  Search for an ORed list of searches
                
	  /paste_new_line_op=1
	  Fill in this in the input line/search box, then press ENTER = SWITCH ON (see also status line).
	  MARK individual/several/all search terms in a text file, then copy them to the clipboard with CTRL+C
	  and then paste them into the input line of 'Everything' with CTRL+V.
	  
	  Important instructions:
	  - The search is done per line!
	  - Do NOT insert a line (ENTER) after the last search term in the text file!
	  
	    If in 'Everything' after inserting in the input line at the end (!) for example the following is displayed: |<>
	    Example: <search term 1>|<search term 2>|<search term 3>|<>
	    then |<> must be REMOVED at the end of the input line, i.e. it has to be deleted(!)
	    (because then there was a <ENTER> after the last line/the last search term in the text file).
	    
	  - If necessary, it is recommended to apply a filter to the search result,
	    e.g. !<C:|I:|J:> (i.e. the results of drive C:, I: and J: should be excluded from the search result).
	    
	  - Search box in 'Everything', maximum number of characters: 
	    The search field is limited to 2 billion characters: 
	    2,000,000,000,000  10^9, 9 zeros ... https://en.wikipedia.org/wiki/Billion
	    There is a limit of 4096 visible characters.
	    If you have more than 4096 characters the search box will still work, it will just not render correctly.
	    See: 
	    https://www.voidtools.com/forum/viewtopic.php?p=25286#p25286
	    https://www.voidtools.com/forum/viewtopic.php?p=25347#p25347
	    
	  - "Search for:" field in TC: Max. Number of characters: 2046 characters
	    
	  /paste_new_line_op=0
	  Fill in this in the input line/search box, then press ENTER = SWITCH OFF (see also status line),
	  if this option is no longer desired.
	  	  
- Copy the file list - as published in the forum - and paste it into the search box of 'Everything'.
  In 'Everything', after inserting the file list into the search box, it is automatically displayed as below in the code field. -> "ORed list of searches"
- Results in 'Everything' in real time (if you have set everything correctly):

Code: Select all

<SS_E2Maisonoffwall.dds>|<tl_ss_E2_Maison_floor1.dds>|<ss_e2maisontiles.dds>|<tl_ss_E2_Maison_wall3c.dds>|<ss_e2maisonwall1b.dds>|<tl_ss_E2_Maison_wall3b.dds>|<tl_ss_e2_maison_wc_tiles.dds>|<tl_e2_maison_wall_amber.dds>|<tl_ss_E2_Maison_marble.dds>|<SS_E2Maisoncarpet.dds>|<tl_E2_Maison_stairs.dds>|<ss_e2maisonwall3c.dds>|<tl_ss_e2_maison_wc_tiles2.dds>|<tl_ss_E2_Maison_carpet3.dds>|<SS_whitebrick.dds>|<ss_e2maisonwall3e.dds>|<ss_concreteblend3c.dds>|<tl_ss_E2_Maison_shuttertl_ss_e2_maison_shutter_a.dds>|<tl_E2_Maison_lamp_floor.dds>|<ab_sop_door2.dds>|<tl_e2_maison_doorframe_black.dds>|<SS_steel2.dds>|<ss_lighttemp.dds>
In Total Commander make the following search - with prefix 'ev:' (for being able to use search parameters of tool 'Everything'):

Code: Select all

ev:<SS_E2Maisonoffwall.dds>|<tl_ss_E2_Maison_floor1.dds>|<ss_e2maisontiles.dds>|<tl_ss_E2_Maison_wall3c.dds>|<ss_e2maisonwall1b.dds>|<tl_ss_E2_Maison_wall3b.dds>|<tl_ss_e2_maison_wc_tiles.dds>|<tl_e2_maison_wall_amber.dds>|<tl_ss_E2_Maison_marble.dds>|<SS_E2Maisoncarpet.dds>|<tl_E2_Maison_stairs.dds>|<ss_e2maisonwall3c.dds>|<tl_ss_e2_maison_wc_tiles2.dds>|<tl_ss_E2_Maison_carpet3.dds>|<SS_whitebrick.dds>|<ss_e2maisonwall3e.dds>|<ss_concreteblend3c.dds>|<tl_ss_E2_Maison_shuttertl_ss_e2_maison_shutter_a.dds>|<tl_E2_Maison_lamp_floor.dds>|<ab_sop_door2.dds>|<tl_e2_maison_doorframe_black.dds>|<SS_steel2.dds>|<ss_lighttemp.dds>
(PASTE content from search box of 'Everything' after TC search parameter -> ev: in TC field "Search for:")



This method can also be used to find file names + path.
Example (file list):

Code: Select all

D:\zzz\File.txt
D:\zzz\Filters.csv
Copy content of file list, paste in 'Everything' - Search box ... this then shows:

Code: Select all

<D:\zzz\Datei.txt>|<D:\zzz\Filters.csv>
Search in separate process... Alt+Shift+F7 -> "Search for:" in Total Commander:

Code: Select all

ev: <D:\zzz\Datei.txt>|<D:\zzz\Filters.csv>


Limit the search results


Windows 10 Pro (x64) Version 20H2 (OS build 19042.844) | TC 9.51 x64/x86
[X] 'Everything' | 'Everything'-Version 1.4.1.1007 (x64)
Search queries: TC <=> 'Everything' | Tag: filelist Dateiliste
User avatar
MARK2580
Junior Member
Junior Member
Posts: 43
Joined: 2016-07-01, 07:31 UTC
Location: Russia. Kirov

Re: Selection from a buffer or file does not work.

Post by *MARK2580 »

2tuska
Thanks for the answer, of course, but this is too much. This program is useless for me, I try to keep the minimum number of programs in the background. Also, here you need to do some unrealistic amount of manipulations. I already wrote 2 times that the option with fake files and SELECTFILEST + %Z%S suited the most. This is much faster than all the methods described above.
2ghisler
A question for you: why is SELECTFILEST still able to highlight the necessary files in the search results? If there are not only files but also the full path, and the function "from buffer or file" does not work. Maybe this is still a bug ? 🤔
Win 10x64 / TC 11.01 x64 / Ryzen 5 3600 / GTX 3060 12gb / 32gb RAM
User avatar
tuska
Power Member
Power Member
Posts: 3733
Joined: 2007-05-21, 12:17 UTC

Re: Selection from a buffer or file does not work.

Post by *tuska »

MARK2580 wrote: 2021-03-04, 13:09 UTC 2tuska
Thanks for the answer, of course, but this is too much.
This program is useless for me, I try to keep the minimum number of programs in the background.
Also, here you need to do some unrealistic amount of manipulations.
I already wrote 2 times that the option with fake files and SELECTFILEST + %Z%S suited the most.
This is much faster than all the methods described above.
OK.

Allow me here just to list the steps regarding 'Everything' and Total Commander.
  1. Your file list: CTRL+A (select content), CTRL+C (copy to clipboard)
  2. CTRL+F11 [start] change to 'Everything' ('Everything' - Keyboard: -> Show window Hotkey: CTRL+F11)
  3. CTRL+V Paste content from clipboard -> search result is immediately visible in 'Everything'! -> Real-time
     
  4. CTRL+A (select content of Search box in 'Everything'), CTRL+C (copy to clipboard)
  5. ALT+TAB Switch to Total Commander
  6. ALT+Shift+F7 Search in separate process...
  7. Input of: ev:, CTRL+V, press button "Start search".
    Search result in Total Commander is visible almost immediately! -> almost Real-time!
NotNull
Senior Member
Senior Member
Posts: 266
Joined: 2019-11-25, 20:43 UTC
Location: NL

Re: Selection from a buffer or file does not work.

Post by *NotNull »

MARK2580 wrote: 2021-03-03, 19:37 UTC I tried installing "Everything" and did not understand its usefulness at all. The search did not work faster
That is something you don't hear every day: Everything is too slow .. :)

I do like your clever 'fake files' solution. By all means, keep using that.

But ...
For demonstration purposes and maybe for others who frequently need to search for a list of filenames that are in a textfile:
  • In Total Commander, browse in one pane to the folder where you want to search for your files
  • In the other pane, browse to the textfile that contains the filenames and highlight it.
  • Make that the active pane
  • Click on "the button"
  • Everything will open with all matches
  • Ctrl-C/Ctr-V or drag/drop the files to a folder in TC.
  • Done
I am really curious if the 'fake files' method is faster?



"The button":

Code: Select all

TOTALCMD#BAR#DATA
"C:\Program Files\Everything\Everything.exe"
-filter Everything -path "%T" -search-file-list %P%N
C:\Program Files\Everything\Everything.exe
Search for a list of files in the target folder
C:\Program Files\Everything\

-1
(adapt if your Everything is installed in a different location)
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6429
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Selection from a buffer or file does not work.

Post by *Horst.Epp »

NotNull wrote: 2021-03-04, 18:41 UTC
MARK2580 wrote: 2021-03-03, 19:37 UTC I tried installing "Everything" and did not understand its usefulness at all. The search did not work faster
That is something you don't hear every day: Everything is too slow .. :)

I do like your clever 'fake files' solution. By all means, keep using that.

But ...
For demonstration purposes and maybe for others who frequently need to search for a list of filenames that are in a textfile:
  • In Total Commander, browse in one pane to the folder where you want to search for your files
  • In the other pane, browse to the textfile that contains the filenames and highlight it.
  • Make that the active pane
  • Click on "the button"
  • Everything will open with all matches
  • Ctrl-C/Ctr-V or drag/drop the files to a folder in TC.
  • Done
I am really curious if the 'fake files' method is faster?



"The button":

Code: Select all

TOTALCMD#BAR#DATA
"C:\Program Files\Everything\Everything.exe"
-filter Everything -path "%T" -search-file-list %P%N
C:\Program Files\Everything\Everything.exe
Search for a list of files in the target folder
C:\Program Files\Everything\

-1
(adapt if your Everything is installed in a different location)
Remove the -filter Everything -path "%T" from the parameters
and it does what the poster wants (searching for names regardless of their location).
Also the procedure is made even simpler in this case,
just use the button to open the file list
regardless of the target folder content.
Windows 11 Home x64 Version 23H2 (OS Build 22631.3296)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
Post Reply