How to get files based on lastest date

September 24, 2010 at 02:17:58
Specs: Windows XP
Hi,

Example:

AAA_20100909.csv
BBB_20100909.csv
AAA_20100910.csv
BBB_20100910.csv

How to write a batch script which is able to grab the files based on the lastest date. In the examples above, I just want to grab the files named AAA_20100910.csv and BBB_20100910.csv, anyone can assist?

Many Thanks :)


See More: How to get files based on lastest date

Report •


#1
September 26, 2010 at 01:09:00
yokelai, In this forum, we have quite a bit of generalized knowledge, but you'll likely get more and more knowledgeable responses in the programming forum @:
http://www.computing.net/forum/prog...
That said, I'd put a variable containing the current date (maybe use an 'if-then' if you need to go back?) to enhance the 'open' statement and narrow down the filename?
HTH.
Ed in Texas.

Report •
Related Solutions


Ask Question