I have an iPhone connected to my PC via the lightning to USB cable. It appears as a device under "This PC", and I can copy files from it. I want to automate this using Python, but trying to access "This PC" as a path doesn't work.
import os
path = r"This PC\Apple iPhone\Internal Storage"
for entry in os.listdir(path):
print(entry)
Traceback (most recent call last):
File "C:\test.py", line 4, in <module>
for entry in os.listdir(path):
FileNotFoundError: [WinError 3] The system cannot find the path specified: 'This PC\\Apple iPhone\\Internal Storage'
Some say that the F:\ drive is the one that holds the device files, but the iPhone doesn't register itself as a drive.
How do I find the absolute path of an iPhone and access its files? I'd like suggestions to be available in Python, but any will do.