The Exchange 2007 Wiki

Delete all .txt Files

Description

The one-liners below can be used to recursively delete all .txt files in a given directory and all its sub-directories.

One-Liner

Get-ChildItem -include "*.txt" -recur | remove-item

or

Get-ChildItem -rec -filter *.txt | remove-item

 

 

 

Disclaimer: The sample scripts are meant to serve as examples and may need modifications before they will work in your environment. The authors of the script are not responsible for any negative outcome that may result from using them. 

Site

Changes
Index
Search

 

User

 

Log In
Register

 
 

Last Modified 8/7/06 2:02 PM