Get-childitem parameter-exclude, filter, recurse Application

Source: Internet
Author: User

 

1 $ P = "D: \ psscript" 2 3 GCI $ p-exclude "updatelog" # exclude sub-directories "updatelog", but the-recurse parameter cannot be used later, otherwise, the-exclude parameter is invalid. 4 GCI $ p-exclude "Description .txt"-recurse # exclude file "Description .txt ", you can use the-recurse parameter together with 5 6 GCI $ p-filter "updatelog" # Only traverse sub-directories "updatelog" 7 GCI $ p-filter "* server *" # traverse servers containing keywords directory 8 GCI $ p-filter "* server *"-recurse #-The recurse parameter does not take effect

 

1 Gbit/s "file 2 GCI $ p-exclude" updatelog "| % {GCI $ _. fullname-exclude" Description .txt "-recurse |? {! $ _. Psiscontainer} | remove-item-force}

 

Get-childitem parameter-exclude, filter, recurse Application

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.