How to properly -filter multiple strings in a PowerShell copy script

前端 未结 4 501
暗喜
暗喜 2020-11-29 00:01

I am using the PowerShell script from this answer to do a file copy. The problem arises when I want to include multiple file types using the filter.

Get-Chi         


        
4条回答
  •  [愿得一人]
    2020-11-29 00:48

    Get-ChildItem $originalPath\* -Include @("*.gif", "*.jpg", "*.xls*", "*.doc*", "*.pdf*", "*.wav*", "*.ppt")
    

提交回复
热议问题