Getting the "oldest" file

Advertisement

mw4
Joined:
Posts:
1
Location:
san fran

Getting the "oldest" file

Using automation, what would the wildcard or other way to get the oldest file from a directory list like this:

FAIR_INVOC.2014_07_10_0132.TXT.PGP
FAIR_INVOC.2014_07_10_0145.TXT.PGP
FAIR_INVOC.2014_07_10_0156.TXT.PGP
FAIR_INVOC.2014_07_10_0159.TXT.PGP

Obviously date and time are listed within the filename as YYYY_MM_DD_HHMM, but logically it would be the oldest file time stamp as well.

I just want the cleanest/easiest way to get just the ONE oldest file (could be one file in the directory or 10 with FAIR_INVOC), which in this case would be FAIR_INVOC.2014_07_10_0132.TXT.PGP.

Thanks!

Reply with quote

Advertisement

Advertisement

You can post new topics in this forum