Hi all, I was hop(e)ing for some assistance with a batch script I have been writing.
I have to delete a bunch of files from thousands of subfolders, and I'm having some trouble figuring out the right syntax for it.
So far I have this:
@echo off
;;;remove all temporary subfolders that are older than today
;;;del isn't the right command for folders of course
del "Z:\projects\*_backup\"
del "D:\localdatatemp\*_backup\"
;;;remove all temporary files that are older than 3 months ago
del /S /Q "Z:\projects\*.00??.rvt"
;;;remove all temporary files that are older than 6 months ago
del /S /Q "D:\localdatatemp\*.rvt"
I am using Windows 10 x64 with system date format as DDMMYYYY, which seems to be important for filtering filedates, but I'm not sure how to go about it as the only example I found was for US filedates.
If I have posted in the wrong section, please let me know.
I would be grateful for any help, thankyou.