Delete Bulk Files based on age and exclude certain files with specified characters

Please help me:

I have a task to delete files from shared location on the network. Here is the breakdown.

  • Shared location: \path\to\folder
  • Doc type to delete: Excel
  • Time period: modified files 2 years older and does not contain facebook in the excel name ext
  • Validate prior to delete with validation report

Welcome to the forum.

What you described above is a very achievable task. What’s your question?

What exactly do you need help with?

The cmdlets you might use to accomplish this task could be

Please always read the complete help topic of the cmdlets including the examples to learn how to use them.

If you already have some code you just got stuck with you’re very welcome to share this code here along with the error messages if there are some and an explanation what’s not working as expected and we will be happy to try to help you.

1 Like