Copy files from Android phone

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 script: 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.

Once you know the folder name, can you use New-PSDrive to map a drive to that folder? That’s the only way PowerShell’s going to be able to do a copy.

It’s been a while since I used a USB connection with my phone, but I recall having all sorts of problems treating it like a shared folder. It looks like one in Windows Explorer, but no drive letter, and only a subset of normal file commands are available. I doubt you can map a drive letter to it. You would probably have the most luck using the windows copy functions rather than powershell’s copy-item.

Look for links similar to this one.