How to do a case-sensitive file search with PowerShell? -
get-childitem -path c:\ -filter caps*
finds caps.txt want create sure find caps.txt (or e.g. caps901918.whatever)
i've tried find ways pipe filter look like:
{ $_.what_i_just_said_to_filter_on -like [a-z] }
or suppress output after receiving results have found nothing.
try piping get-childitem
where-object
this:
get-childitem -path c:\ | where-object {$_.what_you_want_to_filter -match "regex"}
here syntax (thanks flgmwt)
get-childitem -path c:\ | where-object {$_.name -clike "caps*"}
powershell search case-sensitive
No comments:
Post a Comment