On a recent project I thought I had completed it worked fine on my developement machine but went belly-up when moved to my office pc at the church. It didn't take too long to figure out what was causing the problem.

The program would keep a record of the date and time the user logged on and off and automatically backup my database when the program was exited. Both the logfile and the database bakup are stored in subdirectories of the application directory. On my development system I had manually created the sub-directories way back when and had forgotten about them.

How can I have my program check if the directories exist when the application loads and if not, creat them?

On a somewhat related question, the log file is a text file where each entry is a seperate line preceeded by the date such as:

10/24/2001 - Billy Jones logged on succesfully at 10:28.
10/24/2001 - Billy Jones logged offsuccesfully at 12:13
10/24/2001 - Database was automatically backed up at 12:13.

Over time this file could grow way too large, especially when the program could be logged into and out of numerous times a day.

Is there a way to have my program automaticcally check this file before it writes to it and delete all lines that are more than 30 days old?

Thanks,
Rev. Michael L. Burns