Sometimes you need to delete contents from a folder or multiple folders. In this article, we will do just that.
We will delete the contents of 4 folders.
You will first need to allow PowerShell to run scripts.
Next, copy and save this as Remove.ps1
Several options for running this.
- Right-click and choose [run with PowerShell]
- Run with [PowerShell ISE]
Right-click the file and choose [Properties]
Click the [Change..] button
Scroll down and choose [Look for another app on this PC]
Paste this in
%windir%\system32\WindowsPowerShell\v1.0
Click [Enter].
Select [powershell_ise.exe ]and click [Open] (This is the PS Editor. Great for design and editing your Scripts)
Click [Apply] and [OK]
When you double click the file it will open the [ISE].