I am trying to capture the shutdown process to delete some windows temp files older than 7 days on a small drive.
I have tried this:
- Code: Select all
#( Delete_WinTemp
WatchQueryShutdown
Action:
INTERCEPT-SHUTDOWN
PAUSE: 1000
RECURSIVE
PURGE-OLDA: "q:\temp\*" 7
BALLOON: "Attention!" "Windows Temp file older than 3 days have been deleted!"
BEEP: 250 500
PAUSE: 1000
CONTINUE-SHUTDOWN
)#
I do not believe that this is working because I do not receive the Balloon and the size of the drive does not change.
Could someone help with this script?
Thanks