I've got a script that moves files around based on date and other criteria, but I want to do a one time delete of the files in a directory as part of the main script, but I only want to run it once and I want to run it the next time the scheduled process runs after 4pm. The scheduled process runs every 15 minutes. If I leave the script as posted, I'll delete files I want to keep potentially 3 different times. Any suggestions on an easy way to do what I want?
Code:
;Clean reports out of rptsmail folder
$rptsmaillog = "c:\temp\parselog." + $date + ".txt"
$folder3 = "c:\temp\temp3"
If Val("$Hour") = "16"
Del $folder3 + "\*"
$=writelog2($rptsmaillog,"{{Reports Mail}}",1)
EndIf