Hey all. I'm a newbie at C++ and hope that you guys can guide me along. I recently got assgined a project and is needed to code it in C++, which I have almost zero experience with, so bear with me. =)
I need to delete 3 log files from a particular location. The name of the 3 files include (name + date + extension)where the name could be changed in a particular ini file. There is a configuration file "config.ini" which looks something like this:
1 2 3 4 5
|
[config]
PATH = C:\\Test\\
LOG1 = ABC
LOG2 = XYZ
DB = DATA
|
LOG1 and LOG2 needs to be on yesterday's date. An example would be "ABC090420.txt". DB needs to be the date when it was eight days ago.
I want to be able to change the path where the file is located and the name of the files at will in the "config.ini". Whether the files are deleted or not, it will be recorded in a newly created text file "LogDelete.txt". The program will run once every week, which means the "LogDelete.txt" will keep appending data without overwriting previous weeks' record.
I have completed the date part (getting yesterday and eight days ago date) and the "LogDelete.txt" thanks to Google =). I don't have the code right now so I will post them here tomorrow.
My request now is to have someone guide me along as to what I am suppose to do and give me a brief idea of how the syntax of each particular steps will look like. I am not asking for anyone to write the entire code for me, because I want to learn this and do it by my own effort if possible.
I am currently running on Windows XP and using Dev-C++.
If anyone wants a sample of how the program looks like, I have a jar file which I have completed previously but got rejected. You need java runtime to run the jar file.
http://www.mediafire.com/download.php?tfmtmnlhgln
Advice or input appreciated, and thanks for taking your time to read this long post.