Columns: Newest/Oldest filedate columns with filtering

Don't worry.
It should be pretty straightforward if you use as a template a current script that implements EverythingInterface (e.g. this one).

Here's a script that adds the following columns:

  • Newest File Date Created
  • Oldest File Date Created
  • Newest File Created
  • Oldest File Created
  • Newest File Date Created (Rec)
  • Oldest File Date Created (Rec)
  • Newest File Created (Rec)
  • Oldest File Created (Rec)
  • Newest File Date Modified
  • Oldest File Date Modified
  • Newest File Modified
  • Oldest File Modified
  • Newest File Date Modified (Rec)
  • Oldest File Date Modified (Rec)
  • Newest File Modified (Rec)
  • Oldest File Modified (Rec)

Newest-Oldest v1.0.opusscriptinstall (2.3 KB)

Note that I barely tested this :grinning_face:, so you'll be the official tester now.
It should be very fast (depending on your Everything config, of course, but it's designed with speed in mind), both for recursive and non-recursive columns.
I tested with Everything v1.5 on my machine. The script is very basic, so it assumes you already have Everything properly configured (created/modified properties indexed, etc.).

It's designed to reuse the data as much as possible, so it doesn't query Everything for each column. Sometimes this can work against it, (I think it's some quirks with multi-column behavior).

Currently subfolders are ignored when picking the data. You can change that in the code if you want, by editing the Everything query.
As for filenames related columns, it currently shows the full path. Edit as needed.

Let me know how it goes (maybe this one deserves its own thread here :upside_down_face: ?).

3 Likes

Very cool, thank you so much @errante. :heart:

It’s working as expected in my first tests. I have several folders that only contain subfolders and no files, so I removed the file: filter from the query to also consider folders (esp. relevant in the non-recursive version). There seems to be some caching going on, as the removed file: filter does not seem to be respected for folders that I’ve tested your script against before. (Restarting DOpus hasn’t helped, restarting the Everything service / computer might help, will test that.)

Btw, I don’t think this is actually a ā€œnicheā€ use case: having folders for each project with many sub-files and sub-folders, the modified date of the project-folder itself isn’t of much value to actually sort by ā€œwhich project have I last worked onā€. So looking forward, this might as well become a native feature at some point. (CC: @Leo @Jon)

That said, I think this script definately deserves its own thread. :slight_smile: Again, thanks so much.

I'll just test it myself this time. I found some quirks too. The good news is that all of them are fixed now. I'm going to post a formal version later.

Your example is the definition of "niche" :slightly_smiling_face:

I'm not sure if something like this would make sense to be built-in, I'm not the gatekeeper for that type of requests, but FWIW, with a script column I wrote, I can get size/file counts faster than the built-in columns. The "fixed" version of this one is also really fast.

1 Like

Done. Let me know if you find any error (once the post gets approved).

P.D. Maybe adding age-related columns would be useful?

Perfect, many thanks! :clap:

Do you mean relative date columns like ā€œX days agoā€? Definitely helpful for me, though I’m also fine by solving this via an evaluator column for consistency. (I also have eval. cols. configured for the regular modifieddate column.)

Sure. Just make sure you posted your Evaluator solution. I’m itching to know which version will be faster.

I’ve posted it here. Just replace both modifieddate references with Val("scp:Newest-Oldest/newest_modified_recursive").