I want to write a batch script that will check a network location for folders that are older than X days and delete them. I tried to use forfiles
with /d -x
, but I get an error that I can't use UNC paths. I've also tried using robocopy /move
with /minage:x
, but it's looking for files rather than folders.
Is there a way to do this?