Hello,
The situation is, I have a list of *.zip files in "D:\sysadmin\Eventlogs"
I want to output how many days old the oldest file is base on today’s date
I am able to get a listing of all zip files in a directory "D:\sysadmin\Eventlogs"
Using the line below successfully:
pathnames of find files “*.zip” of folder “D:\Sysadmin\Eventlogs”
I need some help on getting the date of the oldest file and outputting how many days old it is based on today’s date.
@Berjaya has the right idea, but if you want to not just know how old the oldest file is, but you also want to be able to query other info about that file, you have to use single recursion.
(pathname of it, creation time of it, now - creation time of it) of files whose (name of it contains ".zip" AND creation time of it = minimum of creation times of files whose(name of it contains ".zip") of folders "D:\Sysadmin\Eventlogs") of folders "D:\Sysadmin\Eventlogs"