Good day,
Mundane SAS jobs are triggered periodically on our machine. Every now and then the jobs fail and leave temporary files. (Stored in C:\Users\< user_Name>\AppData\Local\Temp\SAS Temporary Files\ in windows environment.)
Eventually these clog up the machine. Currently we have to delete them by hand. I'm wondering if SAS could delete old (lets say week plus) old files periodically? Scheduling independent cleanup job is what I'm looking for.
I could use other means to do this, like python scripts, but single language environment will bring about managements blessing and benevolence.
Edit: pathname was not showing properly
Here's a macro which invokes the DOS
forfiles
command, and deletes each matching file. Thepushd
allows this to work with UNC paths also.So, using your example :
You could put this in an autoexec, or at the start or end of your programs.