I'm looking for help creating a PowerShell script to remove files older than 60 days from multiple folders while omitting two particular files from this rule. The first 11 characters for all the files are the same, but the ones that I want to maintain end with a YTD while the others are Daily_xxxxx. The script to delete the files is no problem, but I'm running into an issue getting it to omit the particular files that I want to remain.. Any help would be greatly appreciated.
Login or Sign Up
- Log in with