How to display only latest/most recent file in each subfolder?

If you are experiencing problems with "Everything", post here for assistance.
Post Reply
Madma
Posts: 8
Joined: Fri Sep 15, 2017 2:53 pm

How to display only latest/most recent file in each subfolder?

Post by Madma » Tue May 11, 2021 12:18 pm

Hello!
Here again in search for some help. I really can't wrap my head around that. :oops: :oops: :oops:

Is there a way to display only the latest modified file in each subfolder?

Let's say I have:

"C:\folder1\" which has 50 subfolders (sub1,sub2,sub3,etc...), and in each of these there are hundreds of files. I'd like to find the latest modified file for each subfolder.

Is there a way to achieve this?

Any help would be really appreciated.
Thank you

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

Re: How to display only latest/most recent file in each subfolder?

Post by NotNull » Tue May 11, 2021 2:15 pm

Long story short: No. You will have to write a script to accomplish that.

therube
Posts: 2944
Joined: Thu Sep 03, 2009 6:48 pm

Re: How to display only latest/most recent file in each subfolder?

Post by therube » Tue May 11, 2021 3:58 pm

You might see if Nirsoft's FolderTimeUpdate can do something for you.

You can run it in simulation mode (so no updating occurs) & it should be able to list every directory & what its' last modified (file) time would be.
It would not show the files themselves, so this might not work for you?

And, you can also run it from a command-line.

void
Site Admin
Posts: 6931
Joined: Fri Oct 16, 2009 11:31 pm

Re: How to display only latest/most recent file in each subfolder?

Post by void » Tue May 11, 2021 11:08 pm

I'm looking into a way to do this...

In the Everything 1.5 alpha, the closest Everything current has is to sort by Path Ascending and then Date Modified Descending.
An option to 'find one of' items is on my TODO list (similar to the find dupes, the theory is you would right click the path column header and click 'find one of')

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

Re: How to display only latest/most recent file in each subfolder?

Post by NotNull » Tue May 11, 2021 11:26 pm

With ES.exe and a little CMD script:

Code: Select all

@echo off

(for /d %%x in ("c:\some folder\*") do ( ES.exe  file:  parent:"%%x\"  -sort-dm-descending  count:1 )) > "%temp%\latest.txt"
"c:\path to\Everything.exe" -search-file-list "%temp%\latest.txt" 
(untested; just to give some inspireation)

Post Reply