Hello and thank you for reading. In a particular folder, I want (in ASP) to delete all files that are older than two days. Currently I can delete files by name only like (this code works):
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
I have tried getting the file properties, then I could get the names of old files and delete like above. The code I have (this code gives an error "Microsoft VBScript runtime (0x800A01A8) Object required" on the last line):
Set sh = CreateObject("Shell.Application")
set fl = sh.Namespace(folder)
for each f in fl.Items
folder in the second example is Report_Filename in the first example up to (including) the last "\", the same folder but no file name. I don't think it'll be too difficult, but is urgent.