Skip to content

Files

Latest commit

Mar 24, 2018
7b593f9 · Mar 24, 2018

History

History
This branch is 20 commits behind nightroman/PowerShellTraps:main.

Wildcards-miss-hidden-items

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Mar 24, 2018
Mar 24, 2018
Mar 24, 2018

Test-Path -Path with wildcards misses hidden items

Test-Path treats hidden files and folders not like *-Items cmdlets do:

  • With literal paths, it finds items regardless of their hidden attribute.
  • With wildcards, it gets false if only hidden items match.

Unlike *-Item cmdlets, Test-Path does not have the switch Force in order to control the treatment of hidden items.

See the example script Test-1.ps1.