Situation: I have a program that generates a log file each day at 8am in the format C:\2010\4\1\Example.txt (YYYY\M\D\Example.txt). However, logs are not generated on weekends and holidays.
Ultimately, I would like to read the contents of the previous "X" number of days of Example.txts. Specifically, I would like to count one day at a time backwards from today's date (up to X number of days), and find out if an Example.txt exists for that day (inspection by file existence).
Question 2) Given today's date is 2010\4\1 how do I go backwards in time (by days) and create a filepath for 2009\3\31, 2009\3\2\30, etc...for X number of days?