开发者

Effective way to filter on multiple wildcards in PowerShell

开发者 https://www.devze.com 2023-01-27 09:21 出处:网络
I\'d like to be 开发者_JAVA百科able to do gci -filter *.ps1,*.cs,*.sql but that syntax isn\'t supported.Use -Include which takes an array, instead of -Filter. Note that you have to use * as the pat

I'd like to be 开发者_JAVA百科able to do

gci -filter *.ps1,*.cs,*.sql

but that syntax isn't supported.


Use -Include which takes an array, instead of -Filter. Note that you have to use * as the path when using -Include:

Get-ChildItem * -Include *.ps1,*.cs,*.sql


With v3, can do gci -file "*.ps1","*.txt"

0

精彩评论

暂无评论...
验证码 换一张
取 消