Computing.Net > Forums > Programming > finding oldest folder

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

finding oldest folder

Reply to Message Icon

Name: Gubien
Date: March 23, 2009 at 04:48:53 Pacific
OS: Windows Vista
Subcategory: Batch
Comment:

Like this script finds the oldest file

@echo off
for /f "tokens=*" %%F in ('dir *.* /b /a-d /o-d') do set Oldest=%%F
echo Oldest=%oldest%

How can I find the oldest folder?



Sponsored Link
Ads by Google

Response Number 1
Name: Holla
Date: March 23, 2009 at 06:16:29 Pacific
Reply:

Just replace /a-d by /ad

@echo off
for /f "tokens=*" %%F in ('dir *.* /b /ad /o-d') do set
Oldest=%%F
echo Oldest=%oldest%

--
Holla.


0
Reply to Message Icon

Related Posts

See More


basic prog dimension mbepoints with ...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: finding oldest folder

Find oldest file in folder www.computing.net/answers/programming/find-oldest-file-in-folder/14755.html

Need help with finding folders www.computing.net/answers/programming/need-help-with-finding-folders/18527.html

Find and Delete Folders using a bat www.computing.net/answers/programming/find-and-delete-folders-using-a-bat/18643.html