Re: Access flles on a Android device from Windows PC (Posting On Python-List Prohibited)

2017-06-09 Thread Fred Fishbin
Lawrence_D?Oliveiro  wrote:
>On Thursday, June 8, 2017 at 3:41:35 PM UTC+12, Fred Fishbin wrote:
>> Yup, that seems to be the deal, and there doesn't seem tpo be a really 
>>simple 
>> way to deal with this.
>
>The preferred way to do file transfers to/from Android devices over USB seems 
>to be via MTP nowadays .

Excellent!  Exactly what I was looking for!

thank you, Freddie
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Access flles on a Android device from Windows PC (Posting On Python-List Prohibited)

2017-06-09 Thread Fred Fishbin
Lawrence_D?Oliveiro  wrote:
>On Thursday, June 8, 2017 at 3:41:35 PM UTC+12, Fred Fishbin wrote:
>> Yup, that seems to be the deal, and there doesn't seem tpo be a really 
>>simple 
>> way to deal with this.
>
>The preferred way to do file transfers to/from Android devices over USB seems 
>to be via MTP nowadays .

Excellent!  Exactly what I was looking for!

thank you, Freddie
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Access flles on a Android device from Windows PC

2017-06-09 Thread Fred Fishbin
Um, no.  I *now* understand that USB Mass drive is no longer supported, but it 
was a legit question.

I'd still love if someone could post a code sample, or point me in the 
direction to a code snippet that would show me how to access the phone.  I know 
it can be done, its just not simple anymore.

Freddie

wxjmfa...@gmail.com wrote:
Le mardi 6 juin 2017 21:37:24 UTC+2, Fred Fishbin a écrit :
>> Hi
>> 
>> I want to write little program that my friend can run - he'll plug a USB 
>>drive 
>> into his Windows 7 PC, plug his phone in a USB port on same PC, then run my 
>> program and it'll xfer some audiobook files over for him.
>> 
>> I plugged the USB drive in and it became "G:\", but the phone plugged in and 
>> became just "SAMSUNG-SM-G930V", no drive designation, just a Portable Media 
>> Device.  Windows Explore can go there so the files are accessible, the phone 
>> isn't looking him out, but what do I use for a path?  I tried several 
>>different 
>> listdir()'s nothing worked.
>> 
>> Thoughts?
>> 
>> thanks, Freddie
>
>I hope your mounted external device is full of file names
>with plenty of Emojis...
>It will be very funny.

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Access flles on a Android device from Windows PC << YES! Thanks

2017-06-07 Thread Fred Fishbin
Yup, that seems to be the deal, and there doesn't seem tpo be a really simple 
way to deal with this.  ...but at least I know what I need to look for.

thanks!  Freddie

eryk sun  wrote:
>On Tue, Jun 6, 2017 at 7:36 PM, Fred Fishbin  wrote:
>>
>> I want to write little program that my friend can run - he'll plug a USB 
>>drive
>> into his Windows 7 PC, plug his phone in a USB port on same PC, then run my
>> program and it'll xfer some audiobook files over for him.
>>
>> I plugged the USB drive in and it became "G:\", but the phone plugged in and
>> became just "SAMSUNG-SM-G930V", no drive designation, just a Portable Media
>> Device.  Windows Explore can go there so the files are accessible, the phone
>> isn't looking him out, but what do I use for a path?  I tried several 
>>different
>> listdir()'s nothing worked.
>
>The shell is probably mounting the device via the Windows Portable
>Devices (WPD) API. It isn't mounted as a USB disk with a file system,
>so it won't be assigned a drive letter that you can simply use via
>file-system APIs such as open (CreateFile), listdir (FindFirstFile),
>etc. You can look into using WPD Automation via win32com [1]. I
>haven't used WPD, so I can't offer specific help.
>
>https://msdn.microsoft.com/library/dd389295

-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Access flles on a Android device from Windows PC

2017-06-06 Thread eryk sun
On Tue, Jun 6, 2017 at 7:36 PM, Fred Fishbin  wrote:
>
> I want to write little program that my friend can run - he'll plug a USB drive
> into his Windows 7 PC, plug his phone in a USB port on same PC, then run my
> program and it'll xfer some audiobook files over for him.
>
> I plugged the USB drive in and it became "G:\", but the phone plugged in and
> became just "SAMSUNG-SM-G930V", no drive designation, just a Portable Media
> Device.  Windows Explore can go there so the files are accessible, the phone
> isn't looking him out, but what do I use for a path?  I tried several 
> different
> listdir()'s nothing worked.

The shell is probably mounting the device via the Windows Portable
Devices (WPD) API. It isn't mounted as a USB disk with a file system,
so it won't be assigned a drive letter that you can simply use via
file-system APIs such as open (CreateFile), listdir (FindFirstFile),
etc. You can look into using WPD Automation via win32com [1]. I
haven't used WPD, so I can't offer specific help.

https://msdn.microsoft.com/library/dd389295
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Access flles on a Android device from Windows PC

2017-06-06 Thread Gregory Ewing

Fred Fishbin wrote:
the phone plugged in and 
became just "SAMSUNG-SM-G930V", no drive designation, just a Portable Media 
Device. ... what do I use for a path?


It's probably something like

\\SAMSUNG-SM-G930V

One way to find out is to open it with Windows Explorer and then
click up in the address bar. It should change to show you a
textual pathname.

--
Greg
--
https://mail.python.org/mailman/listinfo/python-list


Access flles on a Android device from Windows PC

2017-06-06 Thread Fred Fishbin
Hi

I want to write little program that my friend can run - he'll plug a USB drive 
into his Windows 7 PC, plug his phone in a USB port on same PC, then run my 
program and it'll xfer some audiobook files over for him.

I plugged the USB drive in and it became "G:\", but the phone plugged in and 
became just "SAMSUNG-SM-G930V", no drive designation, just a Portable Media 
Device.  Windows Explore can go there so the files are accessible, the phone 
isn't looking him out, but what do I use for a path?  I tried several different 
listdir()'s nothing worked.

Thoughts?

thanks, Freddie
-- 
https://mail.python.org/mailman/listinfo/python-list