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: 10
Joined: Fri Sep 15, 2017 2:53 pm

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

Post by Madma »

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: 5468
Joined: Wed May 24, 2017 9:22 pm

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

Post by NotNull »

Long story short: No. You will have to write a script to accomplish that.
therube
Posts: 5003
Joined: Thu Sep 03, 2009 6:48 pm

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

Post by therube »

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
Developer
Posts: 16913
Joined: Fri Oct 16, 2009 11:31 pm

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

Post by void »

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: 5468
Joined: Wed May 24, 2017 9:22 pm

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

Post by NotNull »

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