Feed list of files to listbox from text file (2022)
Moderators: Hacker, petermad, Stefan2, white
Feed list of files to listbox from text file (2022)
When searching files in branch mode (Ctrl+B) from txt files that containing filenames, we do not have to put in this txt list neither whole path nor relative patch. We can activate RegEx mode in search dialog (Alt+F7) and put '*' (asterisk sign) before each filename.
File names TXT:
*first file name.pdf
*second_file-name.txt
*other FILE.odt
We put location to locatin to FILE_LIST.TXT in "Search in" field with '@':
@D:\folder\sub folder\Folder That We Want to Search in for Filenames\FILE_LIST.txt
if we type:
@D:\Folder That We Want to Search in for Filenames\FILE_LIST.txt
then whole drive D will be used for searching
And going further I'm interested if we can select list of filenames form different drive to search in another drive.
Is something like below is possible?
Filenames from:
C:\File List.txt
Search in:
D:\folder\sub folder\Folder That We Want to Search in for Filenames\
( split from Thread of 2013 https://ghisler.ch/board/viewtopic.php?p=267878#p267878 )
File names TXT:
*first file name.pdf
*second_file-name.txt
*other FILE.odt
We put location to locatin to FILE_LIST.TXT in "Search in" field with '@':
@D:\folder\sub folder\Folder That We Want to Search in for Filenames\FILE_LIST.txt
if we type:
@D:\Folder That We Want to Search in for Filenames\FILE_LIST.txt
then whole drive D will be used for searching
And going further I'm interested if we can select list of filenames form different drive to search in another drive.
Is something like below is possible?
Filenames from:
C:\File List.txt
Search in:
D:\folder\sub folder\Folder That We Want to Search in for Filenames\
( split from Thread of 2013 https://ghisler.ch/board/viewtopic.php?p=267878#p267878 )
- ghisler(Author)
- Site Admin
- Posts: 50865
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: Feed list of files to listbox from text file (2022)
Sorry, I cannot reproduce that. If I put
@D:\Folder That We Want to Search in for Filenames\FILE_LIST.txt
in the "Search in" field and the file doesn't exist, I get a warning that there is no such file.
Maybe I just misunderstood you?
@D:\Folder That We Want to Search in for Filenames\FILE_LIST.txt
in the "Search in" field and the file doesn't exist, I get a warning that there is no such file.
Maybe I just misunderstood you?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
Re: Feed list of files to listbox from text file (2022)
That's the behaviour I've meant:
Gallery
We have files in certain directory in different subfolders:
[img]https://i.postimg.cc/YvsQ6L1w/0-folder-left-and-parent-right-panel.png[/img]
a branch view of this:
[img]https://i.postimg.cc/ns9B0Vk9/0b-folder-Branch-view-Ctrl-B.png[/img]
There are files with file names and/or paths:
+++ find 'qin' and '03-tk'.txt +++
*2022-02-01 18_23_03-tk.png
*qin2018.pdf
+++ find.txt +++
2022-02-01 18_23_03-tk.png
qin2018.pdf
+++ All files in 'Folder'+path.txt +++
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_03-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_22-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_29-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_35-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_40-tk.png
c:\Users\piotr\Downloads\Folder\Article\qin2018.pdf
c:\Users\piotr\Downloads\Folder\Shapes_from_Custom_Shape_Tutorial.odg
Search in: @find 'qin' and '03-tk'.txt
without RegEx
gives:
[img]https://i.postimg.cc/jn4zP8h8/1-find-star-file.png[/img]
[img]https://i.postimg.cc/G9FPW21k/1-find-Reg-Ex-star-file.png[/img]
Files are found regardless of the RegEx parameter.
Search in: @find.txt
without RegEx
gives:
[img]https://i.postimg.cc/ppPQRH23/2-find-file.png[/img]
[img]https://i.postimg.cc/Vd4qNVvv/2-find-Reg-Ex-file.png[/img]
Lack of results.
Search in: @All files in 'Folder'+path.txt
without RegEx
gives:
[img]https://i.postimg.cc/sMXpG4Gc/3-find-path-file.png[/img]
[img]https://i.postimg.cc/34Mp6MSS/3-find-Reg-Ex-path-file-why.png[/img]
Files are found regardless of the RegEx parameter.
Gallery
We have files in certain directory in different subfolders:
[img]https://i.postimg.cc/YvsQ6L1w/0-folder-left-and-parent-right-panel.png[/img]
a branch view of this:
[img]https://i.postimg.cc/ns9B0Vk9/0b-folder-Branch-view-Ctrl-B.png[/img]
There are files with file names and/or paths:
+++ find 'qin' and '03-tk'.txt +++
*2022-02-01 18_23_03-tk.png
*qin2018.pdf
+++ find.txt +++
2022-02-01 18_23_03-tk.png
qin2018.pdf
+++ All files in 'Folder'+path.txt +++
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_03-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_22-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_29-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_35-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_40-tk.png
c:\Users\piotr\Downloads\Folder\Article\qin2018.pdf
c:\Users\piotr\Downloads\Folder\Shapes_from_Custom_Shape_Tutorial.odg
Search in: @find 'qin' and '03-tk'.txt
without RegEx
gives:
[img]https://i.postimg.cc/jn4zP8h8/1-find-star-file.png[/img]
[img]https://i.postimg.cc/G9FPW21k/1-find-Reg-Ex-star-file.png[/img]
Files are found regardless of the RegEx parameter.
Search in: @find.txt
without RegEx
gives:
[img]https://i.postimg.cc/ppPQRH23/2-find-file.png[/img]
[img]https://i.postimg.cc/Vd4qNVvv/2-find-Reg-Ex-file.png[/img]
Lack of results.
Search in: @All files in 'Folder'+path.txt
without RegEx
gives:
[img]https://i.postimg.cc/sMXpG4Gc/3-find-path-file.png[/img]
[img]https://i.postimg.cc/34Mp6MSS/3-find-Reg-Ex-path-file-why.png[/img]
Files are found regardless of the RegEx parameter.
Re: Feed list of files to listbox from text file (2022)
But my original question is:
Can we place file list in location e.g.: D:\find 'qin' and '03-tk'.txt
And Search in folder: c:\Users\piotr\Downloads\Folder\
Can we?
So I want to search for files in one location and be able to refer to search list form another location.
Can we place file list in location e.g.: D:\find 'qin' and '03-tk'.txt
And Search in folder: c:\Users\piotr\Downloads\Folder\
Can we?
So I want to search for files in one location and be able to refer to search list form another location.
Re: Feed list of files to listbox from text file (2022)
And BTW in which circumstances Search only in selected directories/files option is available?
Re: Feed list of files to listbox from text file (2022)
Of course when you select some files and then invoke the search menu.Piotr285 wrote: 2022-03-17, 10:43 UTC And BTW in which circumstances Search only in selected directories/files option is available?
Windows 11 Home, Version 24H2 (OS Build 26100.4351)
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.4 x64
TC 11.55 RC7 x64 / x86
Everything 1.5.0.1395a (x64), Everything Toolbar 1.5.5.0, Listary Pro 6.3.2.88
QAP 11.9.0.4 x64
Re: Feed list of files to listbox from text file (2022)
Did you read help for this?
Search in: Here you can enter one or more starting directories, separated by ";". You can also start the search inside an archive.
You can enter the name of a text file (ANSI, UTF-8 or UTF-16, the latter two with BOM) containing a list of files and directories to be searched, in the form @c:\path\filelist.txt. The file must contain one file/directory name per line, either an absolute path, or relative to the location of the list file. The text file also supports wildcards and regular expressions. The "Search for" field is ignored when searching from list.
Re: Feed list of files to listbox from text file (2022)
if you search in file list, the only source is the file prefixed by @. (keep also in mind that the "Search For" field is ignored and the "Search In" should only contain the list File.)Piotr285 wrote: 2022-03-17, 10:37 UTC But my original question is:
Can we place file list in location e.g.: D:\find 'qin' and '03-tk'.txt
And Search in folder: c:\Users\piotr\Downloads\Folder\
Can we?
So I want to search for files in one location and be able to refer to search list form another location.
If you want to find from this list only file under a specific path, you can use plugin tc.path, tc.ext ... This will replace your "Search For" field.
You cannot mix file list and folder source !
The trick is to add your folder inside the listFile like C:\Folder\*.*, ....
Re: Feed list of files to listbox from text file (2022)
2Piotr285
It works as designed, but I can understand the confusion.
So in this case, the search is done for:
To search for the files in all subfolders as well, you can use regex in the @file:
To search for full file name "2022-02-01 18_23_03-tk.png", add quotes like this:
For other lines you must include a regex on that line.

It works as designed, but I can understand the confusion.
If I remember it correctly, this is why @file was added. To load files from a file and show them in the panel if they exist. The rest was added later.Piotr285 wrote: 2022-03-17, 10:31 UTC +++ All files in 'Folder'+path.txt +++
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_03-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_22-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_29-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_35-tk.png
c:\Users\piotr\Downloads\Folder\2022-02-01 18_23_40-tk.png
c:\Users\piotr\Downloads\Folder\Article\qin2018.pdf
c:\Users\piotr\Downloads\Folder\Shapes_from_Custom_Shape_Tutorial.odg
..
Search in: @All files in 'Folder'+path.txt
without RegEx
gives:
[img]https://i.postimg.cc/sMXpG4Gc/3-find-path-file.png[/img]
[img]https://i.postimg.cc/34Mp6MSS/3-find-Reg-Ex-path-file-why.png[/img]
Files are found regardless of the RegEx parameter.
If there are no wildcards or regex used in the line, a search is done for the a single file at specified location. If no path is specified, the path of @file is used.Piotr285 wrote: 2022-03-17, 10:31 UTC +++ find.txt +++
2022-02-01 18_23_03-tk.png
qin2018.pdf
..
Search in: @find.txt
without RegEx
gives:
[img]https://i.postimg.cc/ppPQRH23/2-find-file.png[/img]
[img]https://i.postimg.cc/Vd4qNVvv/2-find-Reg-Ex-file.png[/img]
Lack of results.
So in this case, the search is done for:
- c:\Users\piotr\Downloads\2022-02-01 18_23_03-tk.png
- c:\Users\piotr\Downloads\qin2018.pdf
To search for the files in all subfolders as well, you can use regex in the @file:
Code: Select all
<^2022-02-01 18_23_03-tk\.png$
<^qin2018\.pdf$
When using wildcards, subfolders are searched as well. All files ending with "2022-02-01 18_23_03-tk.png", ending with "2022-02-01", exactly matching "18_23_03-tk.png" and ending with "qin2018.pdf" are searched in c:\Users\piotr\Downloads and subfolders.Piotr285 wrote: 2022-03-17, 10:31 UTC +++ find 'qin' and '03-tk'.txt +++
*2022-02-01 18_23_03-tk.png
*qin2018.pdf
...
Search in: @find 'qin' and '03-tk'.txt
without RegEx
gives:
[img]https://i.postimg.cc/jn4zP8h8/1-find-star-file.png[/img]
[img]https://i.postimg.cc/G9FPW21k/1-find-Reg-Ex-star-file.png[/img]
Files are found regardless of the RegEx parameter.
To search for full file name "2022-02-01 18_23_03-tk.png", add quotes like this:
Code: Select all
*"2022-02-01 18_23_03-tk.png"
*qin2018.pdf
Not in combination with "Search in @file". That's not supported. (And would create even more confusion.)Piotr285 wrote: 2022-03-17, 10:43 UTC And BTW in which circumstances Search only in selected directories/files option is available?
RegEx applies to the "Search for" field and this field is only used for lines in @file that contain folder name only (ends with \).
For other lines you must include a regex on that line.
Except the next line says it isn'tGral wrote: 2022-03-17, 11:22 UTC Did you read help for this?
...
The "Search for" field is ignored when searching from list.

Last edited by white on 2022-03-18, 15:12 UTC, edited 1 time in total.
Reason: small correction: search for *qin2018.pdf searches for file names ending with "qin2018.pdf"
Reason: small correction: search for *qin2018.pdf searches for file names ending with "qin2018.pdf"
Re: Feed list of files to listbox from text file (2022)
OK, thank you! What a blindness of mind.Horst.Epp wrote: 2022-03-17, 10:51 UTC Of course when you select some files and then invoke the search menu.
Thank you.nsp wrote: 2022-03-17, 12:36 UTC You cannot mix file list and folder source !
The trick is to add your folder inside the listFile like C:\Folder\*.*, ....
To clarify, with list (+++ find+path.txt +++):
c:\Users\piotr\Downloads\*2022-02-01 18_23_03-tk.png
c:\Users\piotr\Downloads\*qin2018.pdf
the search works as I intended:
[img]https://i.postimg.cc/5X3SDLsC/4-find-path-star-file.png[/img]
Re: Feed list of files to listbox from text file (2022)
No, thank you for this citation.Gral wrote: 2022-03-17, 11:22 UTC Did you read help for this?
Search in: Here you can enter one or more starting directories, separated by ";". ...
To clarify, it works as follows:
Search: maj
Search in: p:\Różne\; p:\Dokumenty\
[img]https://i.postimg.cc/fk3LFdwg/5-find-in-entered-directories.png[/img]
Re: Feed list of files to listbox from text file (2022)
I'm still not sure what you really want to achieve.
Maybe there is a different solution to your needs?
E.g. save a search for later use? - tab "Ładuj/ Zapisz"
Maybe there is a different solution to your needs?
E.g. save a search for later use? - tab "Ładuj/ Zapisz"
Re: Feed list of files to listbox from text file (2022)
We prepare summary sheets of the results of individual experiments, stored on the server in separate *.xlsx/*.ods files.
This is done either by direct connection in a spreadsheet or by a query (MS Excel: Power Query).
These files have long names according to some scheme. They are stored in different directories but have unique names.
[img]https://i.postimg.cc/RWFB1yqp/Files-usage.png[/img]
One use case
When working with a direct link, it's a good idea to specify only the files used in the summary sheet, rather than throwing yourself into tons of files. This is because sometimes you need to make small changes to these particular files.
Another use case
When you copy individual files to a local folder and import the data using Power Query, it's also useful to know where they came from so that you can simply copy them again from server in case of changes made to server versions.
In both cases, it is very useful to have a file_list.txt file to refer to these files years later (so as not to confuse them).
[img]https://i.postimg.cc/JsKHhG2D/Data-storages.png[/img]
Re: Feed list of files to listbox from text file (2022)
And additionally, I'm wondering how to copy/overwrite the local versions to the server while preserving the existing server folder structure?Piotr285 wrote: 2022-03-18, 13:41 UTC Another use case
...so that you can simply copy them again from server in case of changes made to server versions.