How to find files from a list and copy them to another folder ?
Moderators: Hacker, petermad, Stefan2, white
-
- Junior Member
- Posts: 3
- Joined: 2024-07-04, 10:17 UTC
How to find files from a list and copy them to another folder ?
Is this kind of advanced search possible?
I have a text file with 19000 lines. Each line is a different string of unique numbers (i.e. 9842314826, 28247939115 etc.).
I want to find files in a folder that contain those strings in their names. All the files have names like this: 21857250156_f1db18c723_6k.jpg, 48707031463_3416a0acd8_o.jpg etc.
Some of those will match, but most won't. When that's done, I want to copy all those files to another folder (feeding to listbox would suffice, I guess).
So far I tried Total Commander and Everything (voidtools), but I can't find a way to accomplish this task using those. Can somebody help me out?
I have a text file with 19000 lines. Each line is a different string of unique numbers (i.e. 9842314826, 28247939115 etc.).
I want to find files in a folder that contain those strings in their names. All the files have names like this: 21857250156_f1db18c723_6k.jpg, 48707031463_3416a0acd8_o.jpg etc.
Some of those will match, but most won't. When that's done, I want to copy all those files to another folder (feeding to listbox would suffice, I guess).
So far I tried Total Commander and Everything (voidtools), but I can't find a way to accomplish this task using those. Can somebody help me out?
Re: How to find files from a list and copy them to another folder ?
- Use an capable editor to edit the text file and replace each line with *<number>*.
- Use the LOADLIST command to load your text file
-
- Junior Member
- Posts: 3
- Joined: 2024-07-04, 10:17 UTC
Re: How to find files from a list and copy them to another folder ?
I did step 1 using RegEx and now every line looks like this: *<9842339874>*white wrote: 2024-07-04, 11:38 UTC
- Use an capable editor to edit the text file and replace each line with *<number>*.
- Use the LOADLIST command to load your text file
I don't know how to use LOADLIST, though. I made a button on the button bar with LOADLIST as command, full path to file as parameters and path to file (sans filename) as start path. When I use the button, it says "File not found! (19000x).
Keep in my mind that only the first part of the filename (before the first underscore) is supposed to match the numbers from the text file.
Re: How to find files from a list and copy them to another folder ?
You have to use LOADLIST0
From the help:
LOADLIST0: Like LOADLIST, but do not show any error messages if files cannot be found.
From the help:
LOADLIST0: Like LOADLIST, but do not show any error messages if files cannot be found.
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: How to find files from a list and copy them to another folder ?
You should have replaced "<number>" with your numbers. So remove the "<" and ">".MarvinStraight wrote: 2024-07-05, 07:14 UTC I did step 1 using RegEx and now every line looks like this: *<9842339874>*
LOADLIST has only 1 parameter, the filename of the list file. The start path will be the location of the list file.MarvinStraight wrote: 2024-07-05, 07:14 UTC I don't know how to use LOADLIST, though. I made a button on the button bar with LOADLIST as command, full path to file as parameters and path to file (sans filename) as start path. When I use the button, it says "File not found! (19000x).
Adjust the expressions in the list file to match what you want. For example to match the number at the beginning of a filename directly followed by an underscore, use:MarvinStraight wrote: 2024-07-05, 07:14 UTC Keep in my mind that only the first part of the filename (before the first underscore) is supposed to match the numbers from the text file.
Code: Select all
9842339874_*
-
- Junior Member
- Posts: 3
- Joined: 2024-07-04, 10:17 UTC
Re: How to find files from a list and copy them to another folder ?
It worked. Thanks!
Re: How to find files from a list and copy them to another folder ?
I too am trying to understand the LOADLIST feature and its companion SAVESELECTION.LOADLIST has only 1 parameter, the filename of the list file. The start path will be the location of the list file.
They seem to be particularly rigid commands with absolute parameters demanded, that is to say:
SAVESELECTION C:\Users\Public\Documents\SaveselectionLoadlist.txt
..as an essentially unchangeable setting for both saving and loading.
The Help file for setting up a button-bar button says:
17. SAVESELECTION, SAVESELECTIONA, SAVESELECTIONW: save names of selected files to the specified file.
Note:- "..the specified file".
Am I right in thinking that this rigidity of configuration is correct and in fact extremely rare in computing ?
It reminds me of recent reports of usernames & passwords written in hardware in some communications devices, or firmware containing the words "These settings are examples. DO NOT USE THESE CODES!" - inside IT gear actually sold on the commercial market.
Regards, PhredE
- ghisler(Author)
- Site Admin
- Posts: 50390
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Re: How to find files from a list and copy them to another folder ?
???
The user specifies the file name to which the list is saved, it's not hard coded.
The user specifies the file name to which the list is saved, it's not hard coded.
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com