When using Ctrl+F box to search for files can specify DSC07503.dng|DSC07505.dng|DSC07508.dng then check Use Regular Expression and it finds all files, is there simpler syntax to specify multiple files without resorting to regular expression?
e.g. something like: DSC07503.dng, DSC07505.dng, DSC07508.dng
Search multiple filenames in Ctrl+F
Moderator: xnview
-
jkm
- Posts: 425
- Joined: Sat May 11, 2024 12:43 am
Re: Search multiple filenames in Ctrl+F
Leave the upper filename field blank, and add filename as a condition in the lower part of the dialog.
You can then use booleans to search for any combination of filenames you want.
You can then use booleans to search for any combination of filenames you want.
-
FKCapitalism2
- Posts: 380
- Joined: Sun Apr 23, 2023 5:14 am
Re: Search multiple filenames in Ctrl+F
Unfortunately that did not work, can't specify one by one, need to paste list of 100+ image names.jkm wrote: Thu Dec 25, 2025 9:18 am Leave the upper filename field blank, and add filename as a condition in the lower part of the dialog.
You can then use booleans to search for any combination of filenames you want.
You do not have the required permissions to view the files attached to this post.
-
jkm
- Posts: 425
- Joined: Sat May 11, 2024 12:43 am
Re: Search multiple filenames in Ctrl+F
It does not work because you're using improper syntax. But I don’t think it’s documented anywhere so you couldn’t have known except for experimentation.
And if you'd said at the outset you insist on searching for 100+ filenames in a single line because you want to paste them in, you could have saved us both a lot of time... So, sorry if you don't like this answer. I imagine you felt by simplifying you were making it easier on whoever would help you, but unfortunately it's the scale that makes the difference in this case.
Instead of just telling you to forget it and use regex, I'll explain; perhaps it will help others that read this.
First, when using the contains operator as you show in your screenshot, you can use wildcards, but otherwise it is expecting a single string. So you can't concatenate filenames with spaces like you're showing; it's nonsensical and unmatchable.
You could add multiple conditions of filename, each with a single filename target string which could contain wildcards. The hint for you to do that was when I said you could use booleans. Booleans require multiple operands.
But now you want to paste hundreds of filenames on a single line; that's new from your original post.
The only other way you can do something like that is to use the "is any of" operator. With that operator, you separate your target strings with semicolons, or pipes. So it would look like:
Filename is any of file1;file2;file3
or
Filename is any of file1|file2|file3
It's semicolons or pipes. You may not use commas, spaces, or any other separator.
But this is effectively the same as what you were already doing, separating with pipes using regex.
FYI: due to a bug in the application, "search in catalog only" must NOT be checked when performing this type of search, or it will return no results.
If you examine the options on the Add>> menu, you will see that other filename-related conditions exist. One for example is Filename (with extention) which you could use instead if you wanted to specify the extension or discriminate by it.
As for pasting "100+" filenames, good luck with that. I have no idea if it will work or how long the maximum string the dialog will allow is. If you have problems because of excessive length, I suggest you find another program to help you manipulate your files. Your approach I find extremely unorthodox; but I'm trying to help you anyway.
In my opinion, this method for finding lots of filenames on a single line is NOT simpler than what you were already doing with regex. You were separating filenames with a pipe, now you're separating with a semicolon or a pipe. It's the same. So if you'd said the "I want to paste in 100 filenames on a single line" in the first place, I just would have told you to keep using regex. So it was a waste of time for both of us, I'm afraid. But perhaps there's some value for others in documenting the ins and outs of something like this.
Simple approaches (as in simpler than regex) are for onesey-twosey searches. To do something like 100 files in a single line, unfortunately the simplest solutions won't work.
In the odd situation of trying to paste in 100+ filenames from some external source, regex is in my view the simplest way, and I honestly don't understand your objection to how you were doing it. Separating the filenames with a pipe and pasting them into a single line, clicking use regex and clicking Search seems pretty easy to me. Perhaps I have a limited imagination, but I don't see how it gets easier, except with telepathy.
Also keep in mind if this is a repetitive thing you're going to do of searching for the same set of filenames, you can save the search as a preset or as a smart album, so you don't have to keep pasting in the same list.
Hopefully this helps. Good luck.
And if you'd said at the outset you insist on searching for 100+ filenames in a single line because you want to paste them in, you could have saved us both a lot of time... So, sorry if you don't like this answer. I imagine you felt by simplifying you were making it easier on whoever would help you, but unfortunately it's the scale that makes the difference in this case.
Instead of just telling you to forget it and use regex, I'll explain; perhaps it will help others that read this.
First, when using the contains operator as you show in your screenshot, you can use wildcards, but otherwise it is expecting a single string. So you can't concatenate filenames with spaces like you're showing; it's nonsensical and unmatchable.
You could add multiple conditions of filename, each with a single filename target string which could contain wildcards. The hint for you to do that was when I said you could use booleans. Booleans require multiple operands.
But now you want to paste hundreds of filenames on a single line; that's new from your original post.
The only other way you can do something like that is to use the "is any of" operator. With that operator, you separate your target strings with semicolons, or pipes. So it would look like:
Filename is any of file1;file2;file3
or
Filename is any of file1|file2|file3
It's semicolons or pipes. You may not use commas, spaces, or any other separator.
But this is effectively the same as what you were already doing, separating with pipes using regex.
FYI: due to a bug in the application, "search in catalog only" must NOT be checked when performing this type of search, or it will return no results.
If you examine the options on the Add>> menu, you will see that other filename-related conditions exist. One for example is Filename (with extention) which you could use instead if you wanted to specify the extension or discriminate by it.
As for pasting "100+" filenames, good luck with that. I have no idea if it will work or how long the maximum string the dialog will allow is. If you have problems because of excessive length, I suggest you find another program to help you manipulate your files. Your approach I find extremely unorthodox; but I'm trying to help you anyway.
In my opinion, this method for finding lots of filenames on a single line is NOT simpler than what you were already doing with regex. You were separating filenames with a pipe, now you're separating with a semicolon or a pipe. It's the same. So if you'd said the "I want to paste in 100 filenames on a single line" in the first place, I just would have told you to keep using regex. So it was a waste of time for both of us, I'm afraid. But perhaps there's some value for others in documenting the ins and outs of something like this.
Simple approaches (as in simpler than regex) are for onesey-twosey searches. To do something like 100 files in a single line, unfortunately the simplest solutions won't work.
In the odd situation of trying to paste in 100+ filenames from some external source, regex is in my view the simplest way, and I honestly don't understand your objection to how you were doing it. Separating the filenames with a pipe and pasting them into a single line, clicking use regex and clicking Search seems pretty easy to me. Perhaps I have a limited imagination, but I don't see how it gets easier, except with telepathy.
Also keep in mind if this is a repetitive thing you're going to do of searching for the same set of filenames, you can save the search as a preset or as a smart album, so you don't have to keep pasting in the same list.
Hopefully this helps. Good luck.
-
FKCapitalism2
- Posts: 380
- Joined: Sun Apr 23, 2023 5:14 am
Re: Search multiple filenames in Ctrl+F
Don't know why you got offended my my response, i was polite.jkm wrote: Thu Dec 25, 2025 11:47 amAnd if you'd said at the outset you insist on searching for 100+ filenames in a single line because you want to paste them in, you could have saved us both a lot of time... So, sorry if you don't like this answer. I imagine you felt by simplifying you were making it easier on whoever would help you, but unfortunately it's the scale that makes the difference in this case.
That totally depends how author or this software created the filter, he could have allowed relaxed matching with space or coma separated for example.jkm wrote: Thu Dec 25, 2025 11:47 amFirst, when using the contains operator as you show in your screenshot, you can use wildcards, but otherwise it is expecting a single string. So you can't concatenate filenames with spaces like you're showing; it's nonsensical and unmatchable.
My original post shows three files used at once, even for three files i would not want to use three separate filters this bit impractical and illogical so if you could not understand what i meant sorry but its pretty obvious to me that what i am asking is how to search for multiple files at once.jkm wrote: Thu Dec 25, 2025 11:47 amBut now you want to paste hundreds of filenames on a single line; that's new from your original post.
Using semicolon did not work in neither of this scenarios.jkm wrote: Thu Dec 25, 2025 11:47 amThe only other way you can do something like that is to use the "is any of" operator. With that operator, you separate your target strings with semicolons, or pipes. So it would look like:
Filename is any of file1;file2;file3
You do not have the required permissions to view the files attached to this post.
-
jkm
- Posts: 425
- Joined: Sat May 11, 2024 12:43 am
Re: Search multiple filenames in Ctrl+F
You were polite. So was I. But ultimately what you asked for was not exactly what you wanted. Not offended, just saying what’s true. If you'd said you wanted to paste 100+, I would have given you a different answer at the outset. That would have saved time, which is preferable. You didn’t have to include 100 filenames in your post, you could have just said “and I want to do this with 100+ filenames names.” That conveys what you actually want to the person trying to help you.FKCapitalism2 wrote: Fri Dec 26, 2025 2:44 pm Don't know why you got offended my my response, i was polite.
Of course it does, as with any software. Your screenshot showed you using spaces, which you cannot use with this app, so I told you what you can use. There’s nothing to discuss here. The syntax is undocumented, you guessed and guessed wrong, and I told you what you can use. That’s it. As I said before, my explanation was partly to help others who find this thread because they search for forums.That totally depends how author or this software created the filter, he could have allowed relaxed matching with space or coma separated for example.
It was pretty obvious you asked for multiple. (Which means more than one). It was pretty obvious you asked for “simpler than regex”. And it was pretty obvious your example showed showed 3. So I gave you an appropriate solution for that. It's also pretty obvious you still do not recognize how much scale or quantity affects the nature of a question or the appropriateness of an approach.My original post shows three files used at once, even for three files i would not want to use three separate filters this bit impractical and illogical so if you could not understand what i meant sorry but its pretty obvious to me that what i am asking is how to search for multiple files at once.jkm wrote: Thu Dec 25, 2025 11:47 amBut now you want to paste hundreds of filenames on a single line; that's new from your original post.
If you asked for a “simple way to move some dirt”, and pointed to a pile of dirt the height of your knee, an appropriate answer is “use a shovel”. But if you’d asked the exact same question and pointed at a pile of dirt the size of a house, then the answer becomes “get a bulldozer”. I hope you can see what I mean.
When you ask for help on a forum, people are providing their time out of the goodness of their heart to help you, and they don’t know your intentions, only what you actually type. It seems more needs to be said about that, but I will stop here.
So with all that, my answer is: just use regex like you were going.
Good luck with your project.