To guarantee deletion, you can use the built-in kill function. Just type in:
kill "C:\files\whatever", or anything you'd like. It's really convenient, because it can even delete files in-use somehow (no idea...), so I just slap a VBScript together whenever I accidently pick up one of those trojans you cant delete...
Main Topics
Browse All Topics





by: smalleePosted on 2003-12-31 at 09:41:29ID: 10022480
hope this helps
Dim File, Folder, FileCollection
Dim fso As New FileSystemObject
Set Folder = fso.GetFolder("C:\files")
Set FileCollection = Folder.Files
For Each File In FileCollection
If DateDiff("d", FileDateTime(File), Now) >= 60 Then
fso.DeleteFile (File)
End If
Next