Quantcast
Channel: DaniWeb Microsoft Windows Topics
Viewing all articles
Browse latest Browse all 2776

Delete folders with specific name recursively

$
0
0

**Hi,

How would I write a Windows Command to delete all folders recurvsively with a specific wildcard name ({*}) under a specific path that is older than 10 days? I would like to run this on the command prompt and I also want to run it as a batch file.

set deletepath = "C:\test\"
set days = 10

Delete all subfolders under deletepath that is older than 10 days and begins with "{" and ends with "}" i.e. {*}**


Viewing all articles
Browse latest Browse all 2776

Trending Articles