FileDelete during runtime

 
I would like to open and delete files during runtime. This is part of my strategy, without restarting the EA.
If I do FileDelete(tmpfile) I get the next error code: 4100 (ERR_SOME_FILE_ERROR). Is there a solution for this probem? Thanks.
 
Is the file "open" or "closed" when you try to delete it?
 
Is the file "open" or "closed" when you try to delete it?

The file ought to be closed. I will have a closer look at that.
 
One of the files wasn't closed, so that was the problem.
Thanks.
Reason: