Script to delete folders older than 7 days after created

June 16, 2018 at 04:28:38
Specs: Windows 7
Hi

I have this script I done and believe that it deletes files in X:\DOWNLOADS that are more than 7 days old.

What im trying to do is to delete the whole SUB FOLDER if it is morw than 7 days after the subfolder was created and not 7 days after last amended of which I believe is the case with the script.

Any Ideas?

forfiles.exe /p X:\DOWNLOADS /s /m *.* /d -7 /c "cmd /c del @file" 

message edited by GDB


See More: Script to delete folders older than 7 days after created

Reply ↓  Report •
Related Solutions


Ask Question