Find Match Case - multiple pdf several files

English support forum

Moderators: Hacker, petermad, Stefan2, white

vascaraus
Junior Member
Junior Member
Posts: 17
Joined: 2022-03-08, 17:28 UTC

Find Match Case - multiple pdf several files

Post by *vascaraus »

hello, I want to find out those list of .pdf files below, into a folder that has more then 1200 .pdf sfiles. So must be a match case. How can I search as to find exactly all the pdf files below?

Code: Select all

7820230610.pdf
28620230610.pdf
31320230610.pdf
83520230610.pdf
79920230610.pdf
320230610.pdf
420230610.pdf
720230610.pdf
920230610.pdf
1420230610.pdf
1920230610.pdf
2220230610.pdf
4920230610.pdf
5020230610.pdf
5720230610.pdf
6720230610.pdf
7120230610.pdf
7720230610.pdf
7920230610.pdf
8120230610.pdf
8720230610.pdf
8820230610.pdf
9020230610.pdf
9620230610.pdf
10220230610.pdf
10620230610.pdf
10720230610.pdf
10920230610.pdf
11020230610.pdf
11420230610.pdf
12420230610.pdf
13520230610.pdf
14120230610.pdf
14220230610.pdf
14520230610.pdf
15120230610.pdf
15520230610.pdf
16020230610.pdf
16620230610.pdf
17720230610.pdf
19020230610.pdf
19120230610.pdf
19420230610.pdf
19820230610.pdf
20020230610.pdf
22220230610.pdf
25120230610.pdf
26120230610.pdf
28320230610.pdf
28420230610.pdf
29120230610.pdf
29820230610.pdf
30320230610.pdf
30420230610.pdf
30520230610.pdf
31520230610.pdf
31620230610.pdf
31720230610.pdf
31920230610.pdf
32020230610.pdf
32320230610.pdf
32820230610.pdf
33820230610.pdf
34020230610.pdf
34120230610.pdf
34220230610.pdf
34820230610.pdf
34920230610.pdf
35920230610.pdf
36520230610.pdf
36720230610.pdf
37420230610.pdf
38120230610.pdf
38320230610.pdf
38420230610.pdf
38520230610.pdf
38820230610.pdf
38920230610.pdf
39120230610.pdf
39320230610.pdf
39520230610.pdf
39920230610.pdf
40720230610.pdf
40920230610.pdf
41620230610.pdf
41720230610.pdf
42720230610.pdf
42820230610.pdf
43120230610.pdf
43220230610.pdf
43520230610.pdf
44120230610.pdf
44320230610.pdf
45720230610.pdf
46620230610.pdf
47420230610.pdf
48320230610.pdf
48520230610.pdf
49320230610.pdf
49420230610.pdf
49520230610.pdf
49620230610.pdf
49920230610.pdf
50020230610.pdf
50820230610.pdf
51220230610.pdf
51420230610.pdf
51520230610.pdf
52520230610.pdf
52720230610.pdf
52920230610.pdf
53120230610.pdf
53320230610.pdf
53820230610.pdf
54420230610.pdf
54720230610.pdf
54920230610.pdf
55320230610.pdf
55420230610.pdf
56020230610.pdf
56720230610.pdf
57720230610.pdf
57820230610.pdf
58520230610.pdf
59420230610.pdf
60120230610.pdf
60220230610.pdf
60320230610.pdf
60520230610.pdf
61320230610.pdf
61720230610.pdf
62220230610.pdf
62320230610.pdf
62520230610.pdf
63320230610.pdf
63420230610.pdf
63720230610.pdf
63920230610.pdf
64120230610.pdf
64420230610.pdf
64920230610.pdf
65120230610.pdf
65420230610.pdf
65520230610.pdf
66120230610.pdf
66520230610.pdf
66820230610.pdf
67020230610.pdf
67220230610.pdf
67420230610.pdf
67620230610.pdf
69120230610.pdf
69620230610.pdf
71520230610.pdf
71820230610.pdf
72520230610.pdf
72920230610.pdf
73820230610.pdf
75220230610.pdf
75620230610.pdf
76020230610.pdf
76320230610.pdf
77720230610.pdf
78120230610.pdf
78320230610.pdf
78620230610.pdf
78820230610.pdf
79320230610.pdf
79420230610.pdf
80220230610.pdf
80520230610.pdf
81720230610.pdf
82220230610.pdf
83020230610.pdf
83720230610.pdf
83920230610.pdf
84020230610.pdf
84120230610.pdf
84720230610.pdf
85020230610.pdf
85520230610.pdf
85620230610.pdf
86120230610.pdf
87820230610.pdf
88020230610.pdf
88120230610.pdf
88420230610.pdf
89120230610.pdf
89520230610.pdf
90020230610.pdf
90220230610.pdf
91620230610.pdf
92520230610.pdf
92720230610.pdf
93120230610.pdf
93820230610.pdf
93920230610.pdf
95120230610.pdf
95320230610.pdf
95420230610.pdf
95920230610.pdf
96120230610.pdf
96820230610.pdf
97320230610.pdf
97620230610.pdf
98220230610.pdf
98620230610.pdf
99220230610.pdf
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6970
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Find Match Case - multiple pdf several files

Post by *Horst.Epp »

Store the names in a file and use @filename in the search field.

From the help:
Search in: Here you can enter one or more starting directories, separated by ";". You can also start the search inside an archive.
Put '>' character in this field before saving the search to keep the "Search in" field unchanged when loading the saved search.
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.

I don't understand what you mean with match case for names, which are numbers only ?
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 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
wetware05
Junior Member
Junior Member
Posts: 64
Joined: 2023-05-15, 16:10 UTC

Re: Find Match Case - multiple pdf several files

Post by *wetware05 »

Horst.Epp wrote: 2023-08-12, 08:21 UTC Store the names in a file and use @filename in the search field.

From the help:
Search in: Here you can enter one or more starting directories, separated by ";". You can also start the search inside an archive.
Put '>' character in this field before saving the search to keep the "Search in" field unchanged when loading the saved search.
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.

I don't understand what you mean with match case for names, which are numbers only ?
Hi, Horst.Epp

I have not understood you :( . Where should we put the file containing the filenames?

Can I make an animated gif or video? Or make an explanation for child: step 1, step 2, ... :roll:
wetware05
Junior Member
Junior Member
Posts: 64
Joined: 2023-05-15, 16:10 UTC

Re: Find Match Case - multiple pdf several files

Post by *wetware05 »

Hi.

I found an autohotkey script that does what vascaraus asks for (if I'm not misunderstood). It is located at https://www.autohotkey.com/boards/viewtopic.php?t=29213 and is by Rohwedder (modified to copy the files to a .txt).

Two windows open requesting information. In the first window we put the text file with the full path, for example: h:\PlayList\PlayerList.txt, In the second window we put the path of where to look for the files, for example: c:\Users\Name_User \Documents\

Code: Select all

InputBox, FullPath, Search File, Entering the Fullpath of File
InputBox, SearchString, Search in %FullPath%, Entering the String to search
Lines =
Loop, Read, %FullPath%
	If InStr(A_LoopReadLine, SearchString)
		Lines .= SubStr(A_LoopReadLine, 1+InStr(A_LoopReadLine,"/",,0)) "`r`n"
FileAppend, %Lines%, File_Result.txt ;filename of the output, is created in the same directory as the script
;MsgBox, % Lines
Reedited: It doesn't really work for the case we are dealing with. It looks for matches between names within a file that contain a full path, for example: h:\Dir\2072075242.pdf and checks that the file exists in the directory entered in the second request. Writes the found files to the file "File_Result.txt".
Last edited by wetware05 on 2023-08-12, 12:29 UTC, edited 2 times in total.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6970
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: Find Match Case - multiple pdf several files

Post by *Horst.Epp »

wetware05 wrote: 2023-08-12, 10:18 UTC
Horst.Epp wrote: 2023-08-12, 08:21 UTC Hi, Horst.Epp

I have not understood you :( . Where should we put the file containing the filenames?
Or make an explanation for child: step 1, step 2, ... :roll:
Alt-F7
Put @filename in the "Search for:" field.
Windows 11 Home, Version 24H2 (OS Build 26100.3915)
TC 11.55 RC1 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
User avatar
tuska
Power Member
Power Member
Posts: 4049
Joined: 2007-05-21, 12:17 UTC

Re: Find Match Case - multiple pdf several files

Post by *tuska »

Search using file lists via copy/paste using the tool 'Everything'
  • Search for list of files?
    ToDo(!): <- This setting in Everything is required only once! ->
    In Everything, type in the following search and press ENTER:
    /paste_new_line_op=1
  • Copy the file list given in the forum (Ctrl+C)
  • Paste the contents of the clipboard into the search box of Everything.
    Example:
    7820230610.pdf|28620230610.pdf|31320230610.pdf ...
  • Complete the content of the search box in Everything as follows:
    exact:<7820230610.pdf|28620230610.pdf|31320230610.pdf|.....|98620230610.pdf|99220230610.pdf>
    Note: exact: | Operators: | OR, < > Grouping
  • 208 PDF files are displayed in real-time in the Everything search result.
  • Important: Also note the other information in the Everything Forum!

Windows 11 Pro (x64) Version 22H2 (OS build Build 22621.2134) | TC 11.00 x64/x86
'Everything' 1.5.0.1354a (x64) | Search queries: Total Commander <=> 'Everything'
User avatar
tuska
Power Member
Power Member
Posts: 4049
Joined: 2007-05-21, 12:17 UTC

Re: Find Match Case - multiple pdf several files

Post by *tuska »

Horst.Epp wrote: 2023-08-12, 08:21 UTC Store the names in a file and use @filename in the search field.

From the help:
Search in: Here you can enter one or more starting directories, separated by ";". You can also start the search inside an archive.
Put '>' character in this field before saving the search to keep the "Search in" field unchanged when loading the saved search.
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.
Example - step by step
  • Create a text file in the folder where you want to find the pdf files(!), e.g. "C:\totalcmd\PDF\ListOfFiles.txt"
  • Copy the file list given in the forum (Ctrl+C) and paste the content of the clipboard into the text file (Ctrl+V)
  • Save the .txt file and close it.
  • Copy the path and filename to the clipboard, e.g. with the command: cm_CopyNetNamesToClip
    Note: cm_commandbrowser: cm_CopyNetNamesToClip    2021    Copy names with UNC path
  • Press Alt+Shift+F7 to perform a search in a separate TC window.
  • Leave the "Search for:" field empty(!)
  • Enter the following in the "Search in:" field: @ ... and then press Ctrl+V to paste the clipboard contents.
    Example: @C:\totalcmd\PDF\ListOfFiles.txt
  • Click on the "Start Search" button
  • The search result will show the PDF files listed in the text file.
vascaraus
Junior Member
Junior Member
Posts: 17
Joined: 2022-03-08, 17:28 UTC

Re: Find Match Case - multiple pdf several files

Post by *vascaraus »

I find the answer. SHort search:

Code: Select all

"7120230610.pdf";"7720230610.pdf";"7920230610.pdf";"8120230610.pdf";"8720230610.pdf"
see here more tips:

viewtopic.php?t=38431
User avatar
Gral
Power Member
Power Member
Posts: 1600
Joined: 2005-01-26, 15:12 UTC

Re: Find Match Case - multiple pdf several files

Post by *Gral »

vascaraus wrote: 2023-08-12, 18:58 UTC I find the answer. SHort search:

Code: Select all

"7120230610.pdf";"7720230610.pdf";"7920230610.pdf";"8120230610.pdf";"8720230610.pdf"
see here more tips:

viewtopic.php?t=38431
This expreession find only 5 of your originally list of 208 files, so this is not right answer.
Also quotation marks are not needed here to work.
User avatar
petermad
Power Member
Power Member
Posts: 16030
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Find Match Case - multiple pdf several files

Post by *petermad »

Also quotation marks are not needed here to work.
And neither are the semicolons.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
wetware05
Junior Member
Junior Member
Posts: 64
Joined: 2023-05-15, 16:10 UTC

Re: Find Match Case - multiple pdf several files

Post by *wetware05 »

Hi.

Tusca's first example using "Everything" is very complex. The second one doesn't work for me. Do I have to include the @ symbol in front of the file name? With or without a symbol, the result is not as expected.

I had an AutoHotkey script, using "Everything" and I've adapted it for the case of having a list of names with no path. At the end it creates and opens a file with the file paths (including duplicates). And it also creates a .txt of the files not found (it also outputs a message for each file not found, if you don't want this message to appear, put a semicolon at the beginning of line 27).

It makes use of the "es.exe" file, which is from Everything, but for the command line, it is downloaded from https://www.voidtools.com/es-es/downloads/ it's almost at the bottom. You have to copy it in the path of Everything.

Change the full paths on lines 8 and 23, of the Everything directory. Also the routes where the results are stored in lines 3, 4, 17, 23, 24, 29, 33, 38 and 40 (I should have created some variables for the routes, sorry :roll:).

Code: Select all

DetectHiddenWindows, Off

FileDelete, h:\Find_Files.txt
FileDelete, h:\Files_not_Found.txt

if not WinExist("Everything")
{
Run, d:\Utilidades\Everything\Everything.exe -startup
}

FileSelectFile, NameTemp
Loop, Read,  %NameTemp%
NumLines:= A_Index

Loop, %NumLines%
 {
 FileDelete, h:\Temp.txt
 FileReadLine, TempTitle, %NameTemp%, A_Index
 ;RegExMatch(TempTitle, "^.*\\(.*)\.(.*)$",m)
 ;NameFileTemp:= % m1 "." m2
 NamePath:= """" . TempTitle . """"
 NameFile:= RegexReplace(NamePath, "[\-\_\s+]", "*") 
 RunWait, %comspec% /c d:\Utilidades\Everything\es.exe %NameFile% > h:\Temp.txt,,Hide
 FileRead, OutputEnd, h:\Temp.txt
 If !OutputEnd
  {
  MsgBox, File not found: %TempTitle%
  SoundPlay, *64
  FileAppend, %TempTitle%`n, h:\Files_not_Found.txt, CP65001  
  }
 Else
  {
  FileAppend, %OutputEnd%, h:\Find_Files.txt, CP65001  
  }
 }

SoundPlay, *64
FileDelete, h:\Temp.txt
MsgBox, Process Completed!!!
Run, h:\Find_Files.txt
ExitApp
(The script starts Everything, if not started, otherwise the script doesn't work. Ah! from the window in which the song appears, it can be played or made to show its location in TCM, in the video, I chose the latter.)

Example video: https://www.youtube.com/watch?v=IBlXSChLXH8

Some things that are done at the end belong in another script. If you want that script (with interaction with TCM), I publish it, you would have to adapt it (I use it for quick searches, from a keyboard shortcut, having a text selected; useful to know if something from the Internet —a video or a song— I already have it downloaded and know where it is).

(Either tonight or tomorrow I do an Autohotkey script, so Everything isn't needed.)
User avatar
tuska
Power Member
Power Member
Posts: 4049
Joined: 2007-05-21, 12:17 UTC

Re: Find Match Case - multiple pdf several files

Post by *tuska »

wetware05 wrote: 2023-08-12, 20:30 UTC Tusca's first example using "Everything" is very complex.
I do not know what is complex about this procedure.
  1. In Everything, type in the following in the search box and press ENTER: /paste_new_line_op=1
    This Everything setting is required only once.
  2. Copy/paste the file list into the Everything search box
  3. Option: If you want exactly these numbers to be found, you have to prepend the parameter -> exact:
    and apply the grouping < > in Everything.
wetware05 wrote: 2023-08-12, 20:30 UTC The second one doesn't work for me. Do I have to include the @ symbol in front of the file name?
Yes, in front of path and filename.
I have described the procedure in detail above.
User avatar
tuska
Power Member
Power Member
Posts: 4049
Joined: 2007-05-21, 12:17 UTC

Re: Find Match Case - multiple pdf several files

Post by *tuska »

vascaraus wrote: 2023-08-12, 18:58 UTC I find the answer. SHort search:

Code: Select all

"7120230610.pdf";"7720230610.pdf";"7920230610.pdf";"8120230610.pdf";"8720230610.pdf"
see here more tips:

viewtopic.php?t=38431
In this case it is sufficient to enter your filenames only separated with a space (see also "Help").

Hint:
In Total Commander max. 2046 characters are possible in the "Search for" field.
Your filenames list ("without formatting") has a total of 3510 characters.

The Everything search field is limited to 2 billion characters.
- 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.
wetware05
Junior Member
Junior Member
Posts: 64
Joined: 2023-05-15, 16:10 UTC

Re: Find Match Case - multiple pdf several files

Post by *wetware05 »

Easier script, just with autohotkey. The path where it searches is changed in line 3 (in line 2 there is the command to select a directory, but it doesn't work this way (?), any suggestion is welcome).

In a second step a window opens to select the .txt file containing the file names.

The script works, but it is not optimized. I don't know why the variable saves a string like "e:\Mp3\Compilations\\Seleccion Wety11 - Rammstein - Halleluja.mp3", with two \ (\\) between the path and the filename, any changes or attempts to fix it , makes it not work. The sequence goes through line 19, which fixes the name by changing \\ to \.

Code: Select all

FileDelete, Find_Files.txt
;FileSelectFolder, FullPath
FullPath:= "e:\Mp3\Recopilaciones\"
FileSelectFile, FileTxt

Loop, Read, %FileTxt%
NumFiles= % Floor(A_Index)

Loop, %NumFiles%
 {
  FileReadLine, NameFile, %FileTxt%, %A_Index%
  Loop, % FullPath "*", 2
   {
    NameDir:= % A_LoopFileFullPath    
    IntFull:= NameDir "\" NameFile
    ;IntFull:= NameDir NameFile
    If FileExist(IntFull)
     {
      NewName:= RegExReplace(IntFull, "\\\\","\")
      FileAppend, %NewName%`n, Find_Files.txt
     }
   }
 }
 If FileExist(A_WorkingDir Find_Files.txt)
  {
   Run, Find_Files.txt
  }
User avatar
petermad
Power Member
Power Member
Posts: 16030
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Find Match Case - multiple pdf several files

Post by *petermad »

wetware05 wrote:Do I have to include the @ symbol in front of the file name? With or without a symbol, the result is not as expected.
Yes put the @ right in in front of the file name, make sure that there is no space before and AFTER the file name.

If the list-file is not in the current directory you need to enter the file name with full path.

If the list-file is not in the same directory as the files you want to find, then each file name in the list-file needs to be with full path.
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Post Reply