When I connect my iPhone to my Windows 7 system, the Windows Explorer opens a Virtual Folder to the DCIM content. I can access the shell library interface via Pywin32 (218) as mentioned here: Can I use library abstractions in python?
Given a user-facing editing path (SIGDN_DESKTOPABSOLUTEEDITING) that works in the Windows Explorer, and launches the Windows Photo Viewer:
Computer\My iPhone\Internal Storage\DCIM\828RTETC\IMG_2343.JPG
How can I obtain a parsing path (SIGDN_DESKTOPABSOLUTEPARSING) for use with SHCreateItemFromParsingName() to create a ShellItem? (From which I'd bind a stream and copy to a local disk like this: Can images be read from an iPhone programatically using CreateFile in Windows? )
from win32com.shell import shelledit_path = r'Computer\My iPhone\Internal Storage\DCIM\828RTETC\IMG_2343.JPG'
parse_path = # How to convert edit_path to a SIGDN_DESKTOPABSOLUTEPARSING path?
i = shell.SHCreateItemFromParsingName(parse_path, None, shell.IID_IShellItem)
The final goal will be to iterate the DCIM "folder" via something like the IShellFolder interface, and copy the most recent photos to the local disk. I don't want to have to open a FileOpenDialog for the parsing name. But before getting to that point, I thought creating a ShellItem for one of the files would be a good test.