Detect Folder and Perform Deletion Task

Hello All,

I am new of Powershell and currently trying to accomplish task which should identify folder “__Data” in each drive and if found delete the entire content inside it.
Please help with the syntax.

welcome to the forum. :wave:t4:

What do you have so far? You should ask a specific question about a particular piece of code you wrote.

It is beyond the scope of this (or any) forum to teach you from scratch how to write scripts. We expect you to make an own attempt to achieve your task before you come here to ask for help.

@ManishSingh Welcome.

If your are looking forward to just get the task done, have a detailed look at below commands.



Have a close look at the examples provided in the documents. You should be able to do what you want.

If you are stuck, please share the code with, folks here will definitely help you out.

1 Like