need a hierarchical date last mod on Windows

Posted on 2013-10-10
Medium Priority
Last Modified: 2013-10-17
I have a directory tree that goes 5-6 levels deep with folders containing a couple of hundred files each.  In short, below the top level folder I may have 100,000 files.

This is Windows 2003.

I need to find the age of the youngest file under this hierarchy.  In other words the date of the most recent file.

How can I do this and get a simple answer that shows on the same screen as the command window where I issue the command?  In other words, I don't want to actually get the date on all these and throw them into Excel and sort.

These machines don't have perl or anything non-Windows.
Question by:Gene Klamerus
1 Comment

Accepted Solution

Onn Light earned 2000 total points
ID: 39564834
Dear klamerus

Keeping things simple considering your directory path is "D:\Mydir", executing the below in windows command prompt will give you the desired result.

DIR  D:\MyDir /S /O-D /P /A-D

Open in new window

/S is for  Displaying files in specified directory and all subdirectories.
/O-D  is for Ordering files by date in descending order (newest first)
/P is for pausing for each page (use Ctrl+C to terminate the result)
/A-D is for displaying only files and not folders

Thanks and Regards

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

This article describes how to set permissions to allow a limited-permissions user to start and stop a particular System Service.   It is always best to give users only the permissions that they need to perform their job, so tweaking particular permi…
The way I use Experts Exchange to assist me in analyzing and diagnosing a problem is I first enter a Verbose Question at Experts Exchange like: Office 2007 will hang when opening and saving files I then launch WordPad (any text editor will do) an…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

597 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question