powershell - What is the FileSystem provider filter syntax? -
get-help get-childitem
displays -filter
parameter, displayed wording "specifies filter in provider's format or language". language differs between powershell calls "providers", , file system declared 1 of them. have not found syntax descriptions on file system provider's filter syntax. help?
the filter syntax supported filesystem provider sparsely (if all) documented, because there's nothing say.
in short, supports simple wildcard matching know windows xp-era search:
any file extension:
*.*
any file .txt
extension:
*.txt
partial wildcard matching:
*something*.txt
single-character matching (matches myfile1.jpg
not myfile01.jpg
):
myfile?.*
note: only supports single expression per filter, illegal:
*.jpg|*.txt
Comments
Post a Comment