I have a com component that logs error details. I wan't to delete the log files that were created one month back. Where this code has to be written ? I mean it should be run only once when the COM compponent is loaded for the first time.
varun_p_n
0
Newbie Poster
Recommended Answers
Jump to PostFirst you have to get a list of all the files in the folder ( see FindFirst() and FindNext() win32 api functions). Then for each of those call _stat() to get the file creation date and compare that with today's date. Finally, use remove() to delete the file.
Where …
All 4 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
varun_p_n
0
Newbie Poster
varun_p_n
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.