Import iPhone Photos

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 2 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
apowershelluser
Posts: 190
Last visit: Mon Mar 18, 2024 7:13 pm
Answers: 1

Import iPhone Photos

Post by apowershelluser »

Since the iPhone doesn't mount like a normal drive, is there anyway we can automatically grab the photos?

Here is the only way I know how to get to the device
  1. $Shell = New-Object -ComObject Shell.Application
  2. $ShellItem = $Shell.NameSpace(17).Self
  3. (((($ShellItem.GetFolder.items() | Where-Object {$_.Name -eq 'Apple iPhone'}).GetFolder.items() |
  4. Where-Object {$_.Name -eq 'Internal Storage'}).GetFolder.items() |
  5. Where-Object {$_.Name -eq 'DCIM'}).GetFolder.items() |
  6. Where-Object {$_.type -eq 'File Folder'}).GetFolder.items()
This is what it returns
  1. Application  : System.__ComObject
  2. Parent       : System.__ComObject
  3. Name         : IMG_4961
  4. Path         : ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_05ac&pid_12a8#00008101001d79663678001e#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SID-{10001,Internal
  5.                Storage,256000000000}\{00000001-0000-0000-0100-000000000000}\{0000230A-0000-0000-0A23-000000000000}\{00002A65-0000-0000-652A-000000000000}
  6. GetLink      :
  7. GetFolder    :
  8. IsLink       : False
  9. IsFolder     : False
  10. IsFileSystem : False
  11. IsBrowsable  : False
  12. ModifyDate   : 12/30/1899 12:00:00 AM
  13. Size         : 0
  14. Type         : JPEG image
  15.  
  16. Application  : System.__ComObject
  17. Parent       : System.__ComObject
  18. Name         : IMG_4960
  19. Path         : ::{20D04FE0-3AEA-1069-A2D8-08002B30309D}\\\?\usb#vid_05ac&pid_12a8#00008101001d79663678001e#{6ac27878-a6fa-4155-ba85-f98f491d4f33}\SID-{10001,Internal
  20.                Storage,256000000000}\{00000001-0000-0000-0100-000000000000}\{0000230A-0000-0000-0A23-000000000000}\{00002A64-0000-0000-642A-000000000000}
  21. GetLink      :
  22. GetFolder    :
  23. IsLink       : False
  24. IsFolder     : False
  25. IsFileSystem : False
  26. IsBrowsable  : False
  27. ModifyDate   : 12/30/1899 12:00:00 AM
  28. Size         : 0
  29. Type         : QuickTime Movie
I notice the size is 0 :( that's probably not a good start
jvierra
Posts: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

Re: Import iPhone Photos

Post by jvierra »

You have to post this question in an Apple iPhone forum or iPhone developer forum. Apple has an API and a driver that mounts an iPhone storeagte as a drive.

What you are seeing is the file specs. YOu have to enumerate the objects and read them in as streams which is an advanced programming method. Developers on the Apple forums can give you help with how to do this. Also you can search for scripts that may be able to do this.

I don't have any examples and I don't have an iPhone.

Also, the output above and teh code indicate that the Apple drivee has not been mount with a drive letter although the "Shell" sees it. Use Drive Manager to assign a drive letter then you can access like any other drive.

It is easier to use Apple software to automaticall mount the storate as a Windows drive.
This topic is 2 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked