Re: ListDirectory.Files does not return collection when only one matching file
I do not think this is true. It's just how the PowerShell presents it. What does
Ntb, if you do
$files.GetType().FullName
say?
Ntb, if you do
$files.Length
, it returns a collection of values returned by .Length
property of collection items (it's a kind of magic). To get number of items in collection, use .Count
.