I just tried to automate a file transfer from my mobile phone (iPhone) to my hard disk. It works via MTP and Powershell (seems the only working approach according to other Stackoverflow posts).
In general it works nice. I use $shell = new-object -com Shell.Application
and then $shell.GetFolder.items()
to navigate in the file system via COM objects.
However I wonder how to get the real file details as they seem weird... The output of one image is for example:
Parent : System.__ComObject
Name : DSUF9528.JPG
Path : ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_05ac&pid_12a8&mi_00#0#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SID-{10002,Internal
Storage,256000000000}\{00000002-0000-0000-0200-000000000000}\{0000160A-0000-0000-0A16-000000000000}\{00001DD7-0000-0000-D71D-000000000000}
GetLink :
GetFolder :
IsLink : False
IsFolder : False
IsFileSystem : False
IsBrowsable : False
ModifyDate : 30.12.1899 00:00:00
Size : 0
Type : JPG-Datei
As you can see, the size is 0 and the modifyDate is in 1899. Which is set for all 5000 images on my iPhone and is in fact wrong. Windows Explorer can show the valid values for these files (how does it do that?). What can I do to find out the real values via Powershell or why are the values returned by the COM object broken?
I'd appreciate any help :)