I use the following (with another pattern of course) to match filenames in a directory.
$test= gci "c:\" | Select Name | Select-String -Pattern ".*"
As a result i get matchinfo-object like this:
@{Name=Examplefolder}
But how do i get just the real result ( in this case "Examplefolder").
Nothing seems to work, e.g.: $test[0].matches.value or
$test[0].name
Thanks, hill