PowerShell – Remove all files from a folder

This script will delte everyting in the “Script” folder, sub-folder, and the “-recurse” option will prevent the prompting of confirmation. The “-exclude” option alllows you to exclude files and folders.

Alternative;

More on the Remove-Item Powershell cmdlet can be found here: Powershell 1.0 http://technet.microsoft.com/en-us/library/ee176938.aspx Powershell 4.0 http://technet.microsoft.com/en-us/library/hh849765.aspx