Thank you Sidewinder, I must be missing something,,, totally new to these vbs files. I copied and pasted your code into a notepad and saved it as avi.vbs on my C:\. Here is how i edited my path in.
Set fso = CreateObject("Scripting.FileSystemObject")
fs = "c:\dvr_data"
ShowFiles(fs)
Sub ShowFiles(Fld)
Set k = fso.GetFolder(Fld)
Set s = k.SubFolders
Set kf = k.Files
For Each objFile In kf
If fso.GetExtensionName(objFile) = "avi" then
If objFile.DateCreated < date - 3 Then
WScript.Echo objFile & " " & objFile.DateCreated
fso.DeleteFile objfile
End If
End if
Next
For Each SubFolder In s
ShowFiles SubFolder
Next
End Sub
I used this code because I too will have subfolders.The path to my files are C:\DVR_DATA\VIDEO in this folder i have cam 1, cam2, cam3, cam4.
I opened a cmd prompt and typed cscript avi.vbs and got the attached results.
Thank you for your time... Sorry i don't understand these vbs files at all. No experience. THANKS AGAIN FOR YOUR TIME AND PATIENTS
[recovering disk space -- attachment deleted by admin]