Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Deleting Files Based on Time or Date
#1
I need some ideas on how to delete files older than 21 days from my "c:\windows\prefetch" directory. Any solutions?

Thanks in advance!
Evangelism - Just Do It!
#2
Code:
Copy      Help
DATE da.getclock ;;get current date/time
da.date-21 ;;-21 days
Dir d; str s
foreach(d "c:\windows\prefetch\*" FE_Dir 0x0 "" da) ;;enumerate files
,s=d.FileName(1)
,out s ;;try this at first. Then enable del.
,;del s

Minimum requirements: QM 2.1.3 or later.
#3
Brilliant...and it works!

Thanks a million :!:
Evangelism - Just Do It!


Forum Jump:


Users browsing this thread: 3 Guest(s)