by ljwilson » 16 January 2024, 20:43
Files are probably still open at that point--it won't delete open files. That is why I run it once a day, and only on files older than 1 day, to work on the ones still hanging around.
You could try running that code in the after login event instead. I assume you've run it through the debugger and the code you have does delete some files, right?
The way I read the code you posted: see if you have any pdf files in the temp folder, and if so delete the first one found. Now see if you have any png files, and delete all of those.
If you are ok with trying to delete all files in the temp folder, just call my procedure in the example app as is. But I would still call it in the after login event.
...jack