I'm looking for a simple script that allows the deletion of all files in a "temp" folder (or maybe the ones that are more than several hours long) inside a specified folder path with a dynamic variable (*)
Given this list of folders:
c:\folder\folder\temp\(files)
c:\folder\folder 2\subfold\test\fld\temp\(files)
c:\folder\folder 3\subfolder553\temp\(files)
c:\folder\folder 4\subfolder23\sfolder343\temp\(files)
Could i delete everything (or anything older than 2/3 hours) insinde the "temp" folders?
I tried something like this:
del /q "c:\folder\*\temp\*.*"
(obviously this doesn't have the code to account for the file age, but could use some help with that also :- )
but this doesn't seem to work. Any ideas?
This is on a 2003 R2 SP2 system.