[question] search for files pairs with (1), (2) and so-on
[question] search for files pairs with (1), (2) and so-on
greetings..
i have a folder with alot of files ended with (1) and (2) and more, these files has the same filename but the stem end is different as i mentioned, the attached image show how filenames looks ..
how can i search for these pairs so both files the original one and the (1) or (2) or more displayed in the results ..
i tried to search the forum here for a solution but with no luck ..
i have a folder with alot of files ended with (1) and (2) and more, these files has the same filename but the stem end is different as i mentioned, the attached image show how filenames looks ..
how can i search for these pairs so both files the original one and the (1) or (2) or more displayed in the results ..
i tried to search the forum here for a solution but with no luck ..
Re: [question] search for files pairs with (1), (2) and so-on
Maybe try:
Code: Select all
dupe: (1)
Re: [question] search for files pairs with (1), (2) and so-on
Does this work for you?
If not:
could you post the list of image files as an EFU file and post them here?
I have a script that can generate these files from the EFU file. Makes it possible to "clone" your environment.
Code: Select all
"C:\your image folder\" regex:"^(whatsapp image.*PM)" dupe:regmatch1
could you post the list of image files as an EFU file and post them here?
I have a script that can generate these files from the EFU file. Makes it possible to "clone" your environment.
Re: [question] search for files pairs with (1), (2) and so-on
To quickly find just the (1) files where the original file exists:
regex:^(.*)" "\(\d+\)\.jpg$ fileexists:$1:.jpg
To quickly find duplicated filenames without the (1) part:
regex:^(.*?)(" "\(\d+\))?\.jpg$ dupe:path;regmatch1
(there might not be an existing filename with no (1) -please be careful deleting the filenames with (1))
To show the original file, where the original file exists without (1), please try:
<regex:^(.*)(" "\(\d+\))\.jpg$ fileexists:$1:.jpg> | <regex:^(.*)\.jpg$ regex:sibling:^$1:" "\(\d+\)\.jpg$ >
regex:^(.*)" "\(\d+\)\.jpg$ fileexists:$1:.jpg
To quickly find duplicated filenames without the (1) part:
regex:^(.*?)(" "\(\d+\))?\.jpg$ dupe:path;regmatch1
(there might not be an existing filename with no (1) -please be careful deleting the filenames with (1))
To show the original file, where the original file exists without (1), please try:
<regex:^(.*)(" "\(\d+\))\.jpg$ fileexists:$1:.jpg> | <regex:^(.*)\.jpg$ regex:sibling:^$1:" "\(\d+\)\.jpg$ >
Re: [question] search for files pairs with (1), (2) and so-on
My first attempt was the following:
But that would have failed if .. (1).jpg does not exist (and (2), (3) etc. do.
Is there a way to use wildcards in in either fileexists: or sibling: ?
Code: Select all
<regex:"^(.*)\.jpg$" expand:fileexists:"$1: (1).jpg"> | <regex:"^(.*)\(\d\)\.jpg$" expand:sibling:"$1:.jpg">
Is there a way to use wildcards in in either fileexists: or sibling: ?
Re: [question] search for files pairs with (1), (2) and so-on
fileexists: and sibling: support Substitution
$1: is expanded for each file/folder.
For example:
regex:sibling:^$1:" "\(\d+\)\.jpg$
wildcards work too with the wildcards modifier:
wildcards:sibling:$1:" "(*).jpg
The next alpha update will have support for:
sibling:$1:" "(*).jpg
The next alpha update will also fix the eating of the trailing >
For now, you'll need to use a space then the trailing >
Please note that substitution can be slow.
$1: is expanded for each file/folder.
For example:
regex:sibling:^$1:" "\(\d+\)\.jpg$
wildcards work too with the wildcards modifier:
wildcards:sibling:$1:" "(*).jpg
The next alpha update will have support for:
sibling:$1:" "(*).jpg
The next alpha update will also fix the eating of the trailing >
For now, you'll need to use a space then the trailing >
Please note that substitution can be slow.
Re: [question] search for files pairs with (1), (2) and so-on
So the "trick" is to put the quotes around just the spaces?
My attempt (IIRC) was to enclose the entire function value in "", but that did not yield any results.
So based on your syntax: regex:sibling:"^$1: \(\d+\)\.jpg$" will give no results.
(removing the quotes and replacing the space with \s fixes that too of course)
Will try to remember .. Thanks!
Re: [question] search for files pairs with (1), (2) and so-on
Thanks for the feedback NotNull,
The next alpha update will allow $property: inside quotes.
For now, please keep $1: outside quotes.
For example:
regex:sibling:^$1:" "\(\d+\)\.jpg$
regex:sibling:^$1:" \(\d+\)\.jpg$"
regex:sibling:"^"$1:" \(\d+\)\.jpg$"
regex:sibling:^$1:\s\(\d+\)\.jpg$
The next alpha update will allow $property: inside quotes.
For now, please keep $1: outside quotes.
For example:
regex:sibling:^$1:" "\(\d+\)\.jpg$
regex:sibling:^$1:" \(\d+\)\.jpg$"
regex:sibling:"^"$1:" \(\d+\)\.jpg$"
regex:sibling:^$1:\s\(\d+\)\.jpg$
Re: [question] search for files pairs with (1), (2) and so-on
I've had this kind of question for years and years!!! Thank god someone else made a post about it echoing my same exact delimma. Thank you Thank youuu
Re: [question] search for files pairs with (1), (2) and so-on
Everything 1.5.0.1367a improves substitution.
sibling: will now have native support for filename wildcards.
For example:
regex:^(.*)\.jpg$ sibling:$1:" "(*).jpg
substitution will no longer eat the trailing >
For example:
<regex:^(.*)(" "\(\d+\))\.jpg$ fileexists:$1:.jpg> | <regex:^(.*)\.jpg$ regex:sibling:^$1:" "\(\d+\)\.jpg$>
substitution can now be used inside quotes.
For example:
<regex:^(.*)(" "\(\d+\))\.jpg$ fileexists:$1:.jpg> | <regex:^(.*)\.jpg$ regex:sibling:"^$1: \(\d+\)\.jpg$">
sibling: will now have native support for filename wildcards.
For example:
regex:^(.*)\.jpg$ sibling:$1:" "(*).jpg
substitution will no longer eat the trailing >
For example:
<regex:^(.*)(" "\(\d+\))\.jpg$ fileexists:$1:.jpg> | <regex:^(.*)\.jpg$ regex:sibling:^$1:" "\(\d+\)\.jpg$>
substitution can now be used inside quotes.
For example:
<regex:^(.*)(" "\(\d+\))\.jpg$ fileexists:$1:.jpg> | <regex:^(.*)\.jpg$ regex:sibling:"^$1: \(\d+\)\.jpg$">