RobotStudio event

log file creation question

Hi all

I would like to use some log files for controlling manufacturing aspects of the robot (such as at what time a cylce started, how many parts it produced and so on).

I've been checking the help and I know how to open a file, write and close it.

My question is how to do it so that those log files don't occupy too much space in the robot controller. For it my idea was that the system should delete files older than 15 days. I used the date for creating the log file (one file per day). How could I do it? I have not found any instruction on how to know if a file with a specied name exists, or to check its date or something like that.

Thank you in advance

Comments

  •  I used the date for creating the log file
    So the file-name contains a date? In that case you can recursively go through the directories and compare the names of files with a given date. 

    If needed I can create an example for you...