Script to remove old files

Home Forums Scripting PowerShell Script to remove old files

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    bloeffler
    Member
    #165515

    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.

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.