Title: Windows USB mass storage - Garmin Alpha 200i mounted as a 'Device' but not a 'Drive'
Tags: python;windows;usb;garmin
Question: We have a python program that scans the mounted drive letters (or volumes, for Linux) for a certain file that indicates a Garmin handheld GPS.  But, the Garmin Alpha 200i is mounted by windows as a 'Device' and not as a 'Drive', and therefore it has no drive letter and you can't get to it from Windows batch or Powershell in the standard C:/Folder notation.
How can we go about accessing the files on the 'Device' from python (or batch or PowerShell)?

It's definitely a mass storage device and has a directory structure - just not sure how to get to it programmatically:


Thinking that this is a Windows or python question, rather than a Garmin question.  This is the first Garmin handheld GPS model we've encountered that mounts as a 'Device' instead of a 'Drive'.
The Garmin manual says that the handheld should be recognized as one or two removable drives, but, that is not the case.  Earlier GPS models do mount up as two drives - one for the handheld's internal storage and another for its memory card if any.

Comment: I guess it works in MTP mode: https://stackoverflow.com/questions/11161747/how-to-access-an-mtp-usb-device-with-python

Here is the accepted answer: Modern devices use Media Transfer Protocol (MTP) instead of USB Mass storage.
This protocol is intentionally nerved, however, and cannot provide drive letters.
You can try one of the Python wrappers for LibMTP.

Comment for this answer: Thanks - I never noticed that my phone behaves the same way in that it doesn't mount as a drive letter.  Looking at available options for libmtp and its python wrappers on Windows, (pymtp is apparently python2-only; mtpy is apparently linux-only) it doesn't seem like there are any turn-key out-of-the-box solutions, except for MPTDrive.com which is not free.  It's interesting that there's no out-of-the-box solution for this by now - or maybe I'm missing something more obvious?
Comment for this answer: Yup - MTP it is, thanks for pointing it out.  I was not familiar with MTP before.  I've been exploring the best way to talk with it, and the mtpmount project is what I'm going with for now, mainly since it has easy turnkey installation.  Currently I'm trying to figure out if the unmount process is strictly required (from the point of view of mtpmount and dokany) since we work in an environment where things are just usually hot-unplugged immediately after the file transfer.  Anyway thanks for the solution to this particular question!


{'source': 'StackExchangeDataset', 'subset': 'stackoverflow.com', 'metadata': {'AnswerCount': 1, 'CommentCount': 1, 'ContentLicense': 'CC BY-SA 4.0', 'CreationDate': '2021:00:04/07/21', 'FavoriteCount': None, 'PostTypeId': 1, 'Tags': '<python><windows><usb><garmin>', 'Title': "Windows USB mass storage - Garmin Alpha 200i mounted as a 'Device' but not a 'Drive'", 'ViewCount': 139, 'id': 66978086, 'user_AboutMe': None, 'user_AccountId': 2924000.0, 'user_DisplayName': 'Tom Grundy', 'user_Reputation': 666.0, 'user_Views': 63.0, 'user_id': 3577105.0}}