File sequences displayed in one row

Have a suggestion for "Everything"? Please post it here.
Post Reply
dsh
Posts: 5
Joined: Mon Aug 16, 2021 11:23 am

File sequences displayed in one row

Post by dsh »

In my work we often do animations. They are rendered as image sequences, often with the same name, but just different directory.

We end up with folder and file structure like this:

Code: Select all

-C:/animations/
   - 2021.08.01
      - frame0001.jpg
      - frame0002.jpg
      - frame0003.jpg
      - frame0004.jpg
      - frame0005.jpg
      - ...
      - frame0200.jpg
   - 2021.08.02
      - frame0001.jpg
      - frame0002.jpg
      - frame0003.jpg
      - frame0004.jpg
      - frame0005.jpg
      - ...
      - frame0200.jpg
When I use Everything and I ask it to search for "frame" I get listed all the files like:

Code: Select all

- frame0001.jpg
- frame0001.jpg
- frame0002.jpg
- frame0002.jpg
- frame0003.jpg
- frame0003.jpg
- ...
- frame0200.jpg
- frame0200.jpg

What I'd love to see if what video softwares do with sequences, they display them with numbering in square brackets:

Code: Select all

-frame[0001-0200].jpg
-frame[0001-0200].jpg
The thumbnail and preview would just show the first frame of a file sequence.
Idealy, this could be enabled just for certain file extensions, like .jpg, .exr, .png

Different softwares output the frame number in different places of the filename.
So this are the cases to support:

Code: Select all

frame0001.jpg
frame.0001.jpg
frame.0001.suffix.jpg

What's a chance of implementing this?
dsh
Posts: 5
Joined: Mon Aug 16, 2021 11:23 am

Re: File sequences displayed in one row

Post by dsh »

I am wondering, is what I wrote here clear?
void
Developer
Posts: 17161
Joined: Fri Oct 16, 2009 11:31 pm

Re: File sequences displayed in one row

Post by void »

Thank you for your suggestion dsh,

I will consider grouping sequential filenames.
Maybe this could be done at index time.

It would be quite inefficient to do real-time.
Everything would likely have to rebuild your indexes after adding new frames.

Everything also prefers to show filenames as they are on disk without any modification.


Consider creating a shortcut or hardlink to the first file:
frame[0001-0200].jpg.lnk link-to: frame0001.jpg
and then search for frame[ in Everything

The problem then becomes updating this list of shortcuts/hardlinks.
I would assume the images don't change, so it would just be a process of automating the new frames.
dsh
Posts: 5
Joined: Mon Aug 16, 2021 11:23 am

Re: File sequences displayed in one row

Post by dsh »

Hey Void, thanks for answering.

I suppose you are right, I am not really sure about how the whole indexing business is setup.

Anyway, I feel like I failed to present my motivation for this feature after all.

I will try to describe my everyday use case in more detail:

In our company we have projects that extends for 2-3 years, sometimes longer.
Over this time we create a new date subfolder everyday we work on this project.
In a typical day we render 5-30 images, but occasionally we render animation sequences also.
So, we end up with project structure like this:

Code: Select all

-C:/projects/projectname/
   - 2021.08.01
      - render1.jpg
      - render2.jpg
      - render3.jpg
      - render4.jpg
      - ...
      - render20.jpg
   - 2021.08.02
      - render1.jpg
      - render2.jpg
      - render3.jpg
      - render4.jpg
      - ...
      - render20.jpg
   - 2021.08.03
      - animation frames
         - frame0001.jpg
         - frame0002.jpg
         - frame0003.jpg
         - frame0004.jpg
         - frame0005.jpg
         - ...
         - frame0200.jpg	
      - render1.jpg
      - render2.jpg
      - render3.jpg
      - render4.jpg
      - ...
      - render20.jpg
As you see, on a third day there is a animation frames subfolder containing the image sequence.

The problem:
I am very often searching for all the pictures in a project, to find one specific version that I can't recall on which day was created.
So my search syntax is:

Code: Select all

"C:/projects/projectname/" pic:
The search results is being overflown with thousands of rows, and since sequences are often very long, sometimes 4000 pictures, it's hard to scroll and search for other images in a project.

Option to merge the sequences to a single entry in the search results would be amazing in my case.
I understand that you pursue the performance, so maybe the solution to this could be simply the way sequences are displayed on the results?
Do not mess your superior indexing algorithms just for purpose of limiting the results displayed.

Maybe the solution would simply be to just throw a first frame of the sequence in the results, and to give a hint to the user that this is a sequence and not a single file by altering the name displayed?

So on doubleclick: it opens the fist frame file
on rigthclick: open a context menu for a first frame file
and so on...

I hope I managed to present my motivation for this feature more clearly now.
void
Developer
Posts: 17161
Joined: Fri Oct 16, 2009 11:31 pm

Re: File sequences displayed in one row

Post by void »

Does the following search help:

"C:/projects/projectname/" pic: !regex:frame\.?(0{3}[2-9]|00[1-9][0-9]|0[1-9][0-9]{2}|[1-9][0-9]{3})

This will exclude files with frame0002-9999 or frame.0002-9999 in the filename.

Double click on the path column (Tools -> Options -> Results -> Open path with double click) to access other files in the sequence.

If this is useful, consider adding it as a filter:
  • In Everything, from the Search menu, click Add to filters.
  • Change the name to:
    No Sequence Filenames
  • Change the search to:
    !regex:"frame\.?(0{3}[2-9]|00[1-9][0-9]|0[1-9][0-9]{2}|[1-9][0-9]{3})"
  • Change the macro to:
    noseq
Now, you can search for:

"C:/projects/projectname/" pic: noseq:


I understand that you pursue the performance, so maybe the solution to this could be simply the way sequences are displayed on the results?
It might be possible for a few thousand results.
I will consider a view option to limit filenames in a sequence to one, with the option to toggle showing all filenames in the sequence or accessing the other files in the sequence via the context menu.
Maybe the solution would simply be to just throw a first frame of the sequence in the results, and to give a hint to the user that this is a sequence and not a single file by altering the name displayed?
I will consider a sequence count, part of sequence and sequence number properties.
Thank you for the suggestions.

For now, Everything 1.5 has the file-exists: search function:

regex:^(.*frame)0001(.*)$ fileexists:\10002\2

This will list the first frame where a second frame exists.



Generate regex range online
dsh
Posts: 5
Joined: Mon Aug 16, 2021 11:23 am

Re: File sequences displayed in one row

Post by dsh »

Thank you for such comprehensive answer, and for considering my suggestions.

For now I am using your regex filters with success.
Regex syntax is a mystery to me, I need to dig into it definitely.

Also I am already using 1.5a and the 'fileexists' function seams very powerful.

Thanks!
Mizufluffy
Posts: 62
Joined: Sun Jun 13, 2021 10:22 am

Re: File sequences displayed in one row

Post by Mizufluffy »

dsh wrote: Thu Aug 26, 2021 11:15 am Regex syntax is a mystery to me, I need to dig into it definitely.
If I may, I'd like to suggest a few websites that could help you get started if you want to dig into regex.
  • https://www.regular-expressions.info/index.html
    • Quick Start, Tutorials, Examples, Pitfalls and a lot more, a good place to start if you are new to RegEx.
  • https://regex101.com/ & https://regexr.com/
    • These both websites have fields where you can input your regular expression and a sample text and you'll be informed if your RegEx matches the sample text, and what each part of the RegEx pattern exactly does. In addition both sites have a quick reference / cheat sheet that can help to remember the RegEx syntax. I'm not new to RegEx but whenever I'm making anything more complicated with it I'll usually use tools like these because they can easily correct you if you make mistakes.
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File sequences displayed in one row

Post by NotNull »

Another possible workflow:

Searching for
"C:\projects\projectname\" regex:"^.*\D0*1\.jpg"
gives you all the first images, like frame001.jpg or animation1.jpg.
Check the previews and if you found the right one, right-click that first image and choose "Open Path".
A new search will be started with the correct foldernamename, giving you all the images of that sequence.


If that sounds like something that can help you, this can be accomplished by following these steps:
  • Make a note of the location where your Everything is installed. For most people that will be either "c:\Program Files\Everything\Everything.exe" (version 1.4) or "c:\Program Files\Everything 1.5a\Everything64.exe" (version 1.5)
  • In Everything, go to menu:Tools > Options > Context Menu
  • From the Context menu items, select Open Path
  • Fill in the Command field:

    Code: Select all

    $exec("c:\Program Files\Everything\Everything.exe" -search """$parent("%1")\""")
    (replace with the actual location of your Everything)
  • Optional, when you still want the possibility to open the location of a file in File Explorer:
    • From the Context menu items, select Explore Path
    • Enable Show this item
  • Click the OK button
  • Done.
Now you can use the search mentioned above (you can also make a bookmark for it, to save typing)



The regular expression ^.*\D0*1\.jpg$ in a bit more detail:

^ = start of the filename
.* = any number of characters
\D = any character, as long as it is NOT a number (0 ..9)
0* = zero or more zero characters
1 = the character 1
\. = a dot
jpg = the text jpg
$ = the end of the filename

So frame0001.jpg, image 1.jpg and sequence1.jpg will be found this way, whereas frame0002.jpg, image 123.jpg and 000sequence3.jpg will not be found.
dsh
Posts: 5
Joined: Mon Aug 16, 2021 11:23 am

Re: File sequences displayed in one row

Post by dsh »

NotNull wrote: Thu Aug 26, 2021 11:53 pm The regular expression ^.*\D0*1\.jpg$ in a bit more detail:

^ = start of the filename
.* = any number of characters
\D = any character, as long as it is NOT a number (0 ..9)
0* = zero or more zero characters
1 = the character 1
\. = a dot
jpg = the text jpg
$ = the end of the filename

So frame0001.jpg, image 1.jpg and sequence1.jpg will be found this way, whereas frame0002.jpg, image 123.jpg and 000sequence3.jpg will not be found.
Wow this is just insanely good. Do you know all the rules by heart?
NotNull
Posts: 5517
Joined: Wed May 24, 2017 9:22 pm

Re: File sequences displayed in one row

Post by NotNull »

dsh wrote: Mon Oct 04, 2021 12:46 pm Wow this is just insanely good. Do you know all the rules by heart?
Thanks. Not even close! There are too many exotic syntaxes (?) for me to remember. I know they exist, so I can look them up when needed, but that's about it.

... which isn't a huge problem as the few that are shown in Everything (Menu:Help > Regex Syntax) or on the Everything Support pages are enough for 90+ percent of all cases where regex might be useful. And after using those for some time, I do know those ones by heart :)


FWIW: I use Everything to test regular expressions as there are thousands - or even millions - of filenames to see the effect of an expression (check the highlighted part of the filename to see what matches).
Post Reply