[help] find pairs if only it's in the same folder

Discussion related to "Everything" 1.5 Alpha.
Post Reply
asamirid
Posts: 127
Joined: Sat Oct 13, 2018 12:28 pm

[help] find pairs if only it's in the same folder

Post by asamirid »

greetings ..

i have a large dataset spreaded in 1k+ folders with a variety of filetypes, .docx .xlsx .pdf and more

now i want to search for .docx and .nth files if they both exist in the same folder

and the results will be the .docx and .nth files itslef not the folders list.
so for example i wanna search
d:\data\
for phrase
invo
in the filenames and filetypes
.docx .nth
if they both adjacent in the same folder.


also if the two desired phrases in the filenames not an extension.

i wanna find both "dd01" and "gg03" if they adjacent together in the same folder


how can i do this kind of search ??

i hope i did explain it well ..

thank you.
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: [help] find pairs if only it's in the same folder

Post by therube »

As a start...

From here, viewtopic.php?p=59001#p59001

So if I'm figuring correctly,
regex:"^(.*x.*).txt$" fileexists:\1.txt2

says to search for a file name that has an X in it with a .txt extension
- where also, there exists the same file name (that's the \1 in the fileexists: part), but with a .txt2 extension.

Now, as written, that will display the filename with the .txt extension (though it knows that the same filename with the .txt2 extension does exist, it does not actually display it.

So something along those lines should allow you to do what you're wanting...
So if you add d:/data/ & info into the mix,
d:\data\ regex:"^(.*invo.*).docx$" fileexists:\1.nth
maybe is a (start) to what you need?
With that theoretically saying, find invoices .docx where there also exists the same invoice filename with a .nth file extension.
asamirid
Posts: 127
Joined: Sat Oct 13, 2018 12:28 pm

Re: [help] find pairs if only it's in the same folder

Post by asamirid »

thank you therube for this, it's kind of good start point,

but it doesn't help with this ..
asamirid wrote: Thu Aug 03, 2023 12:04 pm also if the two desired phrases in the filenames not an extension.

i wanna find both "dd01" and "gg03" if they adjacent together in the same folder ignoring the extensions and filetypes ..
as i don't know how to use
fileexists:
and ignoring filetype ..
therube wrote: Thu Aug 03, 2023 4:59 pm
d:\data\ regex:"^(.*invo.*).docx$" fileexists:\1.nth
maybe is a (start) to what you need?
With that theoretically saying, find invoices .docx where there also exists the same invoice filename with a .nth file extension.
void
Developer
Posts: 16745
Joined: Fri Oct 16, 2009 11:31 pm

Re: [help] find pairs if only it's in the same folder

Post by void »

Use path: if you want to find the pairs in the same folder:

d:\data\ path:regex:"^(.*invo.*).docx$" fileexists:\1.nth


i wanna find both "dd01" and "gg03"
Can you give an example?
dd01 is in one file and dd03 is in the other?
Is the dd03 text in the same location as dd01 was?

Maybe something like:

d:\data\ path:regex:"^(.*invo.*).docx$" fileexists:\1.nth path:regex:"^(.*)dd01(.*)$" fileexists:\1dd03\2.nth
asamirid
Posts: 127
Joined: Sat Oct 13, 2018 12:28 pm

Re: [help] find pairs if only it's in the same folder

Post by asamirid »

hello and greetings..

sorry for late replay i was away from home for some days ..

about this query ..
asamirid wrote: Thu Aug 03, 2023 12:04 pm
also if the two desired phrases in the filenames not an extension.

i wanna find both "dd01" and "gg03" if they adjacent together in the same folder

all i need here is .. search and find both terms "dd01" and "gg03" if they found together in the same folder .. and both terms displayed and appears in the results panel ..

here in the attached image a folder with an example files ..

ev_dd01_gg03.jpg
ev_dd01_gg03.jpg (342.15 KiB) Viewed 2212 times

now all these files in the same folder .. some files has the term "dd01" and others has the term "gg03" as the highlighted files in the image, they are separate terms not in the same filename.

i want to search for both "dd01" and "gg03" as we usually do with this search ..
dd01 | gg03
.. but they both must be together in the same folder to appear in search results panel ..

p.s. files extension is not important and shouldn't be considered in this search

sorry for the inconvenient language .. i hardly translate my thoughts..
asamirid
Posts: 127
Joined: Sat Oct 13, 2018 12:28 pm

Re: [help] find pairs if only it's in the same folder

Post by asamirid »

any new thoughts about this issue :roll: :roll: ..
asamirid wrote: Tue Aug 08, 2023 10:34 am hello and greetings..

sorry for late replay i was away from home for some days ..

about this query ..
asamirid wrote: Thu Aug 03, 2023 12:04 pm
also if the two desired phrases in the filenames not an extension.

i wanna find both "dd01" and "gg03" if they adjacent together in the same folder

all i need here is .. search and find both terms "dd01" and "gg03" if they found together in the same folder .. and both terms displayed and appears in the results panel ..

here in the attached image a folder with an example files ..


ev_dd01_gg03.jpg


now all these files in the same folder .. some files has the term "dd01" and others has the term "gg03" as the highlighted files in the image, they are separate terms not in the same filename.

i want to search for both "dd01" and "gg03" as we usually do with this search ..
dd01 | gg03
.. but they both must be together in the same folder to appear in search results panel ..

p.s. files extension is not important and shouldn't be considered in this search

sorry for the inconvenient language .. i hardly translate my thoughts..
horst.epp
Posts: 1445
Joined: Fri Apr 04, 2014 3:24 pm

Re: [help] find pairs if only it's in the same folder

Post by horst.epp »

2asamirid
No need to add the full text again.
Also, a little bit more patience would be fine.
You didn't report any catastrophic case.
asamirid
Posts: 127
Joined: Sat Oct 13, 2018 12:28 pm

Re: [help] find pairs if only it's in the same folder

Post by asamirid »

hi horst.epp

sorry for that, i just quoted what i was asked for, don't know it has any negative effect !!.

i may delete it if it's wrong or rude.

and iam patient too believe me, i just thought that my post sinked down coz i posted it in the alpha release day.

sorry for any unintended mistake ..
horst.epp
Posts: 1445
Joined: Fri Apr 04, 2014 3:24 pm

Re: [help] find pairs if only it's in the same folder

Post by horst.epp »

asamirid wrote: Fri Aug 11, 2023 4:41 pm hi horst.epp

sorry for that, i just quoted what i was asked for, don't know it has any negative effect !!.

i may delete it if it's wrong or rude.

and iam patient too believe me, i just thought that my post sinked down coz i posted it in the alpha release day.

sorry for any unintended mistake ..
No problem :)
therube
Posts: 4977
Joined: Thu Sep 03, 2009 6:48 pm

Re: [help] find pairs if only it's in the same folder

Post by therube »

Are you only looking for "dd01" and "gg03" where "dd01" & "gg03" exist in \dd_gg\ - regardless of other parts of their names, or are you wanting "dd01" & "gg03" /pairs/, so red_dd01 where red_gg03 also exists, or blue_dd01 where blue_gg03 also exists, but not where only red_gg03 & blue_dd03 exist?

For the former,
\dd_gg\ < dd01 | gg03 >
.
(As written, that will search /dd_gg/, & subdirectories thereof, but you can limit that too.)
Post Reply