Wednesday, February 26, 2014

PowerShell Script to delete the folders or files using specific keyword

Below is the Script to delete the folders or files with specific keyword within a specific location:


get-childitem c:\data -include keyword-recurse | foreach ($_) {remove-item $_.fullname -force -recurse -ErrorAction SilentlyContinue}

No comments:

Post a Comment