3 ms·
There is no Time property. Your initial command 'ls | sort -property time' simply sorts by nothing, i.e. effectively the same as using sort { $null }. I think t
by ygra 10y ago
There is no Time property. Your initial command 'ls | sort -property time' simply sorts by nothing, i.e. effectively the same as using sort { $null }. I think that's what they were so confused by.
- nailer 10y agoYep, hence: > In powershell from memory: in that comment - I was on an iPad, and didn't have access to Powershell.
- flukus 10y agoBut it worked, it didn't complain about no time property like I'd expect.
- ygra 10y agoIt's a scripting language, essentially. Reading properties that don't exist most of the time just gives you $null. That being said, while there is Set-StrictMode, it only helps in this case for directly accessing properties of objects. Indirectly via Sort-Object still doesn't raise an error, annoyingly.