Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
MTP File Access?
Message
From
25/04/2014 06:55:31
Lutz Scheffler
Lutz Scheffler Software Ingenieurbüro
Dresden, Germany
 
 
To
24/04/2014 19:30:33
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01598965
Message ID:
01599054
Views:
64
Likes (1)
>>>When you plug your Android smartphone into your Windows computer you have the option of connecting as an MTP or PTP device. MTP is the recommended type and facilitates access to the files on the Android device. The problem is that VFP doesn't have access to those files. Anybody know how to make that happen?
>>
>>File access is really quirky.
>>
>>I'm trying to allow the user to find a .csv file. If I use getfile('csv') it will not show the file. But if I do just plain getfile() then I can find the .csv file. The full path gets returned as c:\users\username\appdata\local\microsoft\windows\temporary internet files\blah blah blah
>>Windows is copying the file that you select into the temp folder. Other files from the phone in the same folder can not be accessed using this temp path.
>>
>>If you use getdir() you can't see the phone at all.
>
>Do you have to use one of those protocols, or can Windows simply mount the file system of the Android device? How did the .CSV file(s) get on the phone in the first place?
>
>With a quick Google there seems to be a "MTP Device Services for Windows". I haven't looked into it but you might want to find out:
>
>- if that service is required to properly connect up an Android device via USB
>- if that service is present in Server 2012, and running if so
>- if service not present, is it possible to install on Server 2012? Server 2012 has nothing enabled by default, and for security reasons tends to eschew "consumer" functions such as picture/music/media connectivity
>
>Another thing to be wary of with those protocols is it's possible Windows will only allow transfers into/out of the Pictures, Music etc. subfolders of the current user profile. It also might only allow certain file types.

Hi Al,

I have this trouble too. So let me explain:
The file system mounted does not behave like a normal DOS file system and not like an UNC path. One can not address it via \\ or drive letter. If you open up something by double click (let's say a picture) it get copied to some temp folder and opened from there. (When the viewer allows next / prev picture you get strange results)
The PTP shows only pics etc. While the other exposes all files.
It works a bit like an SCP program.
If I need to work on it, I copy the system to some private store, do my work and copy back.
On my comps (XP W7, W8.1) there is no way to eject MTM / PTP stuff.

A lot of non VFP progs have problems too. Examples are XNView, KeePass.

Lutz
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord

Weeks of programming can save you hours of planning.

Off

There is no place like [::1]
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform