Share via


Copy files from Android phone

Question

Sunday, October 30, 2016 1:28 PM

When I connect my Android phone, there's an icon in My Computer, but no letter - this is normal.

USB file transfer is already enabled on phone.

I have found this script that reads all devices (hard drives, optical units...) and displays a list, including Android phone.

https://gist.github.com/cveld/8fa339306f8504095815

It also gives me a list of files and folders.

[One small change to the scrips: replace .GetFolder() with .GetFolder]

Now, what I want is to automatically copy all files and folders from DCIM folder to my computer.

I'm a complete noob at PowerShell, so I'll take any advice (piece of script is even better).

Thank you.

All replies (5)

Sunday, October 30, 2016 1:56 PM

We do not write scripts on request.

If your phone doe not have a utility to copy files then you will need to post in the Android forum and obtain the utility.

You can also search to find examples of how to copy files in Windows.

Here is an example: http://www.wikihow.com/Copy-Files-in-Command-Prompt

Windows 8/10 will automatically copy photos from most devices.

\(ツ)_/


Sunday, October 30, 2016 2:28 PM

I said "piece of script". And I already provided the script I'm working with.

The phone has file copy utility - it's called Windows Explorer.

None of the 3 methods works, because the icon / drive has no letter assigned - normal behaviour, as I already said.

I do not have to write in the Android forum, this feature (drive without letter) is not Android exclusive - same thing happens when I connect a Nikon DSLR device - My Computer icon, but no letter assigned - again, normal behaviour.

It's a Portable Device / MTP feature.


Sunday, October 30, 2016 3:17 PM

Why are you asking for a script if you already have a script that works?

We do not write scripts on request in this forum and we do not modify scripts found on the web.  If you have a PowerShell question about how to use PowerShell or if you are getting an error we can help.

The script you posted is used to read the properties of a file with the shell.  It is not used to copy files.

You can select the device when attached and retrieve the items by using the folder "CopyHere" method of the folder object.

https://msdn.microsoft.com/en-us/library/windows/desktop/bb787866(v=vs.85).aspx

If you are not a Windows technician then most of this will be impossible for you to understand.  You can find many free utilities that wil do what you want.

Again: Windows 8 and later will automatically make copies of files stored on an attached device storage medium. Post in the vendors forum for you camera to learn how to configure this for your camera.  Windows 10 will do this by default the first time you attach the camera.

\(ツ)_/


Sunday, October 30, 2016 3:28 PM

Here is a quick demo of how to use CopyHere with the  shell.

$o = New-Object -com Shell.Application
$targetfolder = $o.Namespace('D:\')  #'
$sourcefolder = $o.Namespace($dcimName)
$targetfolder.CopyHere($sourcefolder,0)

\(ツ)_/


Monday, July 10, 2017 1:40 AM | 2 votes

jrv,

You must have had a bad day, since your tone was anything but nice.  It was clear to me from the first question that the user was asking for syntax to access a drive without a drive letter. I don't think you ever got there.....

I need the same information. so I guess I'll just keep looking......