How to delete files older than a year in Windows Env. using C++??
Posted on 2003-11-11
I want to write a C++ program to do the following:
1 Check for *.log files in D:\Log directory
2 If there are any *.log files of last year(2002 in this case) then zip those files.
3 delete the original files which have been zipped in step 2.
4 create a report of how many files totally have been deleted.
5 if any file other than extn .log is present than create a report specyfing that some other file is there.
How can I achieve it without much overhead in Windows Environment.