I am trying to get the functionality of cmd.exe's "dir /o:d" in PowerShell.
I have tried:
(gci . | ? { $_.PSIsContainer } | sort CreationDate)
d---- 1/15/2013 11:46 AM
d---- 3/5/2013 4:54 PM
d---- 1/15/2013 12:31 PM
d---- 5/10/2013 10:08 AM
d---- 5/17/2013 2:21 PM
d---- 5/15/2013 10:09 AM
d---- 5/15/2013 6:00 PM
d---- 4/15/2013 8:10 AM
Similarly,
(gci . | ? { $_.PSIsContainer } | sort CreationTime)
d---- 1/15/2013 11:46 AM
d---- 1/15/2013 12:31 PM
d---- 3/5/2013 4:54 PM
d---- 5/15/2013 6:00 PM
d---- 5/15/2013 10:09 AM
d---- 5/10/2013 10:08 AM
d---- 5/17/2013 2:21 PM
d---- 4/15/2013 8:10 AM
What am I missing to make the directory list sort by creation date?
TIA for any insights...