is it possible to sort folders by last modification in any content within the folder (no matter how deep down)

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Post Reply
xyuser11
Posts: 3
Joined: 31 Mar 2021 14:11

is it possible to sort folders by last modification in any content within the folder (no matter how deep down)

Post by xyuser11 »

imagine I have 3 folders, named A,B,C, and created in the same order. I decide to sort them by Created Date. So they show up like so:

C
B
A

Each contains many nested sub-folders and files.

The most recent modification of any file anywhere inside folder A was done today.
The most recent modification of any file anywhere inside folder B was done 2 days ago.
The most recent modification of any file anywhere inside folder C was done yesterday.

Is it possible to sort the folders by last modification in their CONTENTS, NO MATTER HOW DEEP THE CONTENTS MIGHT BE IN THE SUB-STRUCTURE/SUB-FOLDER TREE, such that they show up sorted like so:

A
C
B

Thanks in advance.

highend
Posts: 13274
Joined: 06 Feb 2011 00:33

Re: is it possible to sort folders by last modification in any content within the folder (no matter how deep down)

Post by highend »

Sure, but it could be (horrible) slow (depending on how much content these folders have)

Execute ::snippet; from the address bar and then paste this definition into that window:

Code: Select all

Snip: CustomColumn 1
  XYplorer 23.70.0353, 25.11.2022 07:22:15
Action
  ConfigureColumn
Caption
  Mod
Type
  3
Definition
      if (property("#nosubs", <cc_item>) == 6) {
          $folders = quicksearch("/d", <cc_item>, , "m");
          $dateM   = formatlist(regexreplace($folders, "^(.+?)\|(.+?)\|(.+?)\|.+?(?=\r?\n|$)", "$3"), "s", <crlf>);
          return gettoken($dateM, 1, <crlf>);
      }
      return property("#date.m", <cc_item>);
Format
  0
Trigger
  0
Item Type
  1
Item Filter
  
Animation.gif
Animation.gif (552.8 KiB) Viewed 163 times
One of my scripts helped you out? Please donate via Paypal

Horst
Posts: 1085
Joined: 24 Jan 2021 12:27
Location: Germany

Re: is it possible to sort folders by last modification in any content within the folder (no matter how deep down)

Post by Horst »

I do this sometimes with the tool Folder Time Update from Nirsoft.
It sets the folder modification date to the latest file modification inside the tree.
https://www.nirsoft.net/utils/folder_time_update.html
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
Portable XYplorer (actual version, including betas)
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69

Post Reply