I have been trying to write a Powershell script based on some code online that will read the metadata info from picture, video and other files and then sort them based on on
When I run your code, $objFolder.GetDetailsOf($objFolder.Items().Item(0), 12)
I get an empty string. I even changed the item number and the folder I was looking in to make sure I was getting a file object.
However if I do this:
$objShell = New-Object -ComObject Shell.Application
$objFolder = $objShell.namespace("C:\Temp")
$date = $objFolder.Items().Item(3).ModifyDate
I get a value that is already a DateTime
object.
(the code above uses my folder and item index)