A Windows CLI tool for copying files from/to a portable device via MTP.
This tool calls Windows Portable Devices API using Rust for Windows.
mtpcopy copy -R ".\My Music" "My Device:SD Card:\Data\My Music"
- command:
copy
- flags:
-R
(recursive) - source path:
.\My Music
- destination path:
My Device:SD Card:\Data\My Music
- device name:
My Device
- storage name:
SD Card
- path on the storage:
\Data\My Music
- device name:
mtpcopy copy -R "My Device:SD Card:\Data\My Music" "D:\My Music"
- command:
copy
- flags:
-R
(recursive) - source path:
My Device:SD Card:\Data\My Music
- device name:
My Device
- storage name:
SD Card
- path on the storage:
\Data\My Music
- device name:
- destination path:
D:\My Music
mtpcopy copy -M ".\My Music" "My Device:SD Card:\Data\My Music"
- command:
copy
- flags:
-M
(mirror) - source path:
.\My Music
- destination path:
My Device:SD Card:\Data\My Music
- device name:
My Device
- storage name:
SD Card
- path on the storage:
\Data\My Music
- device name:
mtpcopy storages
- command:
storages
mtpcopy list -R "My Device:SD Card:\Data\My Music"
- command:
list
- flags:
-R
(recursive) - path:
My Device:SD Card:\Data\My Music
- device name:
My Device
- storage name:
SD Card
- path on the storage:
\Data\My Music
- device name:
mtpcopy list "*:SD*:\Pictures\202?\**\*.jpg"
- command:
list
- path:
*:SD*:\Pictures\202?\**\*.jpg
- device name:
*
(all devices) - storage name:
SD*
(starts withSD
) - path on the storage:
\Pictures\202?\**\*.jpg
(any jpg files )
- device name:
- unit tests with portable device or mock