Delete files older than n days using PowerShell

You can delete files and folders recursively that are older than n number of days using PowerShell inbuilt cmdlets and pipe. Here is an example for your reference –

Above script developed by: https://stackoverflow.com/users/602585/deadlydog

Leave a Reply