iPhone vs CopyHere

  Kiến thức lập trình

I am trying to use COPYHERE through a ComObject Shell.Application in a PowerShell program
to copy pictures from my iPhone to my Windows 10 PC. It sort of works, but there are a number
of problems.

The basic process uses GetFolder to obtain a list of files on my iPhone. That appears to be working. However, when I use COPYHERE to retrieve a named file it often works but occasionally one of the following happens:

  • The copied image is only partially complete (e.g. a portion of the image is greyed out).

  • The name of the file on the PC does not correspond to the same image on the iPhone (e.g file IMG1234.JPG stored on the PC is actually IMG5678.JPG when viewd on the iPhone)

  • An empty jpg file (0 bytes) is created on the PC even though the corresponding picture on the iPhone is viewable.

Since COPYHERE also works at the level of a directory I’ve tried copying entire directories from my iPhone to my PC. That seems to have solved the partial image and naming mis-matches. Go figure? However, when one of the “empty” jpg files is encountered COPYHERE stops copying at that point. No dialog boxes or return codes (but it does create an empty file (0 bytes). To get around that problem I re-issue COPYHERE and request it to skip existing files (that gets around the “bad” file). I do this in a loop until the number of files on the PC equals the number of files on the iPhone (I can also identify the “bad” files by name).

So far so good? Then very rarely COPYHERE abends and the iPhone disconnects. A dialog box with an error message saying the iPhone is unreachable is displayed. About the only way to get reconnected at this point is a PC reboot! Oddly enough, this does not happen when copying file by file. If I retry copying the directory it abends on the same file (so it must be an issue with that specific file)

Best I can tell from various “Google” searches is that iPhone and COPYHERE are not fully compatible as other people have described similar problems. Is there another way to programmatically and reliably retrieve images from an iPhone to a PC without the use of iTunes or other COTS software.

New contributor

Neal Bredin – Danielle D’Amour is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT