Showing "Paired" files.

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
crimzind
Posts: 24
Joined: Sat Oct 14, 2023 4:48 am

Showing "Paired" files.

Post by crimzind »

So, I've been going overboard with Whisper, and generating .srt/.lrc files for all of my audio/video media. Using content: to search for dialogue/lyrics has been awesome. Being able to search for keywords when you don't recall an exact quote. I love this program so much. :D

Anyway, it's kind of a conditional operation, an if/then, so I suspect there's no current way to accomplish this, but I wish that when searching via content:, I could also get the associated file (the one sharing the same name) to display in the results as well.
For example, searching for

Code: Select all

content:<situation bonus>
currently just presents:
  • Alien (1979).srt
What I'd really love would be if there was a way to get both
  • Alien (1979).srt
  • Alien (1979).mp4
to show, just from the hit on the content: part.
Like I said, it's kind of if content: gets a match, then also display files with shared names, so it's probably not feasible, currently.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Showing "Paired" files.

Post by void »

Thank you for your feedback crimzind,

Please try the following search:

Code: Select all

*.mp4 REGEX_MATCH(GET_PROPERTY($stem:..".srt","content"),"situation.*bonus")
This only shows mp4 files, where the srt file with the same name contains "situation" followed by "bonus" on the same line.

Formulas
NotNull
Posts: 5961
Joined: Wed May 24, 2017 9:22 pm

Re: Showing "Paired" files.

Post by NotNull »

void wrote: Wed Mar 04, 2026 7:07 am
$stem:..".srt",
Where does the
..
come from? Concatenation operator in formulas?
crimzind
Posts: 24
Joined: Sat Oct 14, 2023 4:48 am

Re: Showing "Paired" files.

Post by crimzind »

Code: Select all

*.mp4 REGEX_MATCH(GET_PROPERTY($stem:..".srt","content"),"situation.*bonus")
So, this is… get the name of all mp4 files, find name-matching .srt files, search their content, if a match is found, return the original .mp4 file?
Hmm. It's a much slower process, but it's good to have, thank you.

Media files are going to have over a dozen extensions, but it seems I can use vid: or aud: to broaden it to those instead of one singular extension, so that's awesome.

So, I was being a bit cheeky on the <situation bonus>, the actual phrase was/is "bonus situation". I was highlighting how searching the content that way let's me search just like, well, Everything does elsewhere. The order of words didn't matter, only that both where present in the content.

"content"),"situation.*bonus")
I'm unsure how I would modify that to be... less limited in regards to order, or being on the same line, or if it's possible.
If I wanted to search similarly to content:<situation bonus>, That's...

Code: Select all

vid: REGEX_MATCH(GET_PROPERTY($stem:..".srt","content"),"situation") REGEX_MATCH(GET_PROPERTY($stem:..".srt","content"),"bonus")
Another whole REGEX_MATCH(GET_PROPERTY($stem:..".srt","content"),"WORD") for each word?
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Showing "Paired" files.

Post by void »

Where does the
..
come from? Concatenation operator in formulas?
..
= concatenate strings.
It's not required, but I try to use it in my examples to make things easier to read.


So, this is… get the name of all mp4 files, find name-matching .srt files, search their content, if a match is found, return the original .mp4 file?
Correct.
It will be slow.


Another whole
REGEX_MATCH(GET_PROPERTY($stem:..".srt","content"),"WORD")
for each word?
Correct.



Another option is to create a bookmark with the following search that adds video files to your results:

/select-all
/set-filelist1
filelist1: | < siblingfilelist1: video: fileexists:$stem:.srt > dupe:stem;path


Do your normal
*.srt content:<foo bar>
search, then open the bookmark.
The search is not perfect, it may show duplicated videos with no matching .srt file, eg: foobar.mkv and foobar.avi
crimzind
Posts: 24
Joined: Sat Oct 14, 2023 4:48 am

Re: Showing "Paired" files.

Post by crimzind »

create a bookmark
I made the bookmark, did a search, it showed the expected results, I clicked the bookmark, then no results.
Image

Separately, for something like

Code: Select all

REGEX_MATCH(GET_PROPERTY($stem:..".srt","content"),"WORD")
, is there a way I can macro that?
Something where I could

Code: Select all

vidsub:WORD
where it would run the regex search, but with the word following the macro? Would be much handier than remembering / retyping (or bookmarking, copying/pasting/editing for each usage).
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Showing "Paired" files.

Post by void »

What version of Everything are you using? (Help -> About Everything -> Version)
vidsub:WORD
To create a vidsub macro:
  • In Everything, from the Bookmarks menu, click Add to Bookmarks
  • Change the Name to:
    vidsub
  • Change the Search to:
    REGEX_MATCH(GET_PROPERTY($stem:..".srt","content"),$param:)
  • Change the Macro to:
    vidsub
  • Click OK.
crimzind
Posts: 24
Joined: Sat Oct 14, 2023 4:48 am

Re: Showing "Paired" files.

Post by crimzind »

I'm on v1.5.0.1406a (x64).
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Showing "Paired" files.

Post by void »

Everything 1.5.0.1407a adds a exists-in-filelist1: search function.

Please try changing your bookmark search to:

Code: Select all

/select-all
/set-filelist1
filelist1: | < video: exists-in-filelist1:$stem:.srt >
crimzind
Posts: 24
Joined: Sat Oct 14, 2023 4:48 am

Re: Showing "Paired" files.

Post by crimzind »

Not sure if I'm doing something wrong, or not... :?

Image
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Showing "Paired" files.

Post by void »

Thanks for trying Everything 1.5.0.1407a.

I'm not sure what the issue is as it's working here.

Could you please send your Help -> Troubleshooting information.

Does a search for:
video:
find video files?
crimzind
Posts: 24
Joined: Sat Oct 14, 2023 4:48 am

Re: Showing "Paired" files.

Post by crimzind »

The help info is attached.
video:
does work.
Last edited by void on Fri Mar 13, 2026 2:49 am, edited 1 time in total.
Reason: removed help info
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Showing "Paired" files.

Post by void »

Thank you for the help information.

The help info shows you are still using Everything 1.5.0.1406a.
exists-in-filelist1: doesn't exist in this version.

Please try the same with Everything 1.5.0.1407a.
crimzind
Posts: 24
Joined: Sat Oct 14, 2023 4:48 am

Re: Showing "Paired" files.

Post by crimzind »

Oh, sorry, I didn't realize you had literally put out a new version that I should have grabbed.
Grabbed/Installed that, and now it is working.
That is also a lot faster than the other method, that's amazing, thank you.
void
Developer
Posts: 19839
Joined: Fri Oct 16, 2009 11:31 pm

Re: Showing "Paired" files.

Post by void »

Thanks for letting me know 1.5.0.1407a helped.
exists-in-filelist1: should be very powerful.

I also recommend adjusting your bookmark to not set the sort:
From the Bookmarks menu, click Organize Bookmarks (Ctrl + Shift + B)
Select SiblingList and click Edit...
Set Sort to (No change)
Click OK.
Click OK.

Sorting by name might be more ideal, which can be done temporarily with the bookmark search:

Code: Select all

/select-all
/set-filelist1
filelist1: | < video: exists-in-filelist1:$stem:.srt > sort:name
Post Reply