This forum is closed. Thank you for your contributions.
Hi Guys, Good Day.
I want to delete the FOLDERS (D:\Archive\*) which is older than 3 days using Batch script. Please help me on this regards.
Thanks.
Get-ChildItem D:\ARCHIVE -Directory | Where-Object{$_.LastWriteTime -lt [datetime]::Today.AddDays(-3)} | Remove-Item -Force
¯\_(ツ)_/¯