I hope it's okay to ask a question in a solved thread. Especially with such a noob question.
So I tried the first and simplest version of william_ahk first. To be totally open, I didn't understand at all how it works. But hey, let's give it a shot.
william_ahk wrote: ↑16 Nov 2022, 01:18
Code: Select all
GetDeviceFolder(deviceName) {
shell := ComObjCreate("Shell.Application")
computer := shell.Namespace("::{20d04fe0-3aea-1069-a2d8-08002b30309d}")
for item in computer.Items
if item.Name = deviceName
return item.GetFolder()
}
DeviceFileCopy(src, dest) {
src := StrSplit(src, "\", , 2)
dest := StrSplit(dest, "\", , 2)
GetDeviceFolder(src[1]).ParseName(src[2]).InvokeVerb("copy")
GetDeviceFolder(dest[1]).ParseName(dest[2]).InvokeVerb("paste")
}
DeviceFileCopy("Phone Name\Internal Storage\Folder", "Volume Name (X:)\Folder")
I inserted my paths to my best knowledge, but nothing happens. The device (Huawei Mate 20 X) is mounted and accessible, the destination (S:) likewise. What could be my mistake? I have a feeling, I didn't insert some path. Thanks in advance!
Code: Select all
GetDeviceFolder(deviceName) {
shell := ComObjCreate("Shell.Application")
computer := shell.Namespace("::{20d04fe0-3aea-1069-a2d8-08002b30309d}")
for item in computer.Items
if item.Name = deviceName
return item.GetFolder()
}
DeviceFileCopy(src, dest) {
src := StrSplit(src, "\", , 2)
dest := StrSplit(dest, "\", , 2)
GetDeviceFolder(src[1]).ParseName(src[2]).InvokeVerb("copy")
GetDeviceFolder(dest[1]).ParseName(dest[2]).InvokeVerb("paste")
}
DeviceFileCopy("HUAWEI Mate 20 X\Interner Speicher\MEDIEN\Diary", "USB-Laufwerk (S:)\Folder")