Quantcast
Viewing all articles
Browse latest Browse all 21975

PowerShell Script to find all instances of a named folder and delete all files older than 30 days

I am barely a beginner to scripting and PowerShell but I need to come up with a script that I can schedule to run on the a file server weekly.

I need a script will find all "Example_Data" folders within path "D:\" that are a sub folder of "My Documents" and delete all files within the "Example_Data" folder and any sub folder older than 30 days.


jst3751


Viewing all articles
Browse latest Browse all 21975

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>