GithubHelp home page GithubHelp logo

mtpcmd's Introduction

MTPCmd

License Release Commits since latest release GitHub Actions Workflow Status

Media device (MTP - Media Transfer Protocol) command line interface

Note

This is proof of concept (POC) project for MTP command line

List devices

List connected MTP devices

mtpcmd list
Friendly Name   Manufacturer            Description
WS50            Zebra Technologies      WS50
XQ-BT52         Sony                    XQ-BT52
MC33            Zebra Technologies      MC33
3 devices found.

List connected MTP devices with detailed information

mtpcmd list --detailed
Friendly Name   Manufacturer            Description             Serial Number                           Model
WS50            Zebra Technologies      WS50                    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX44        WS50
XQ-BT52         Sony                    XQ-BT52                 XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX81        XQ-BT52
MC33            Zebra Technologies      MC33                    XXXXXXXXXXXX57                          MC33
3 devices found.

Information

Information about connected MTP device.

Information about first device

mtpcmd info
Device Friendly Name is WS50
Device Manufacturer is Zebra Technologies
Device Serial Number is XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX44
Root Directory is \
Drives:
Fixed "\Internal shared storage" free 2,6 GB of 3,6 GB

Information about MC33 device

mtpcmd info -n MC33
Device Friendly Name is MC33
Device Manufacturer is Zebra Technologies
Device Serial Number is XXXXXXXXXXXX57
Root Directory is \
Drives:
Fixed "\Internal shared storage" free 3,2 GB of 8,6 GB

Directory listing

Listing of directory of connected MTP device

Example: List of Download directory of "internal shared storage"

mtpcmd dir "Internal shared storage/Download"
Device Friendly Name is MC33
Device Manufacturer is Zebra Technologies
Device Serial Number is XXXXXXXXXXXX57

13.03.2024 14:07   <DIR>         Nearby Share
06.11.2020 16:36             657 xxxxxxxxxxxx.key
06.11.2020 16:36             345 xxxxxxxxxxxx.ovpn
06.11.2020 16:36          11 531 xxxxxxxx.ovpn
14.09.2021 12:25          12 581 5105600863.pdf
14.09.2021 12:26         149 223 ZDSPDF_20210914122623.PDF
02.12.2022 12:43      15 773 197 EnterpriseBrowser_signed_3.0.6.0.apk
25.01.2023 14:10      26 236 929 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apk
25.01.2023 22:15      26 236 929 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apk
25.01.2023 22:15      26 236 929 xxxxxxxxxxxxxxxxxxxxxxxxxxxxx.apk
23.10.2023 22:56      55 138 635 anyconnect-5-0-05042.apk
 10 File(s)  149 796 956 Bytes
  1 Dir(s)

Copying files

Copy single file from/to connected MTP device

Copy file to device

mtpcmd put file.txt "Internal shared storage/Download/file.txt"

Copy file from device

mtpcmd get "Internal shared storage/Download/file.txt" file2.txt

Help

Show available verbs - commands

mtpcmd help
mtpcmd 1.0.0
Copyright (c) 2020 Tomas "Arci" Kouba

  list       Display list of MTP devices.

  info       Show information about connected device.

  dir        Device directory listing.

  put        Put/upload file from PC to device.

  get        Get/download file device to PC.

  help       Display more information on a specific command.

  version    Display version information.

Detailed command help

mtpcmd help <verb>

Examples

mtpcmd help list
mtpcmd 1.0.0
Copyright (c) 2020 Tomas "Arci" Kouba

  --detailed    Include details (like S/N) in device list.

  --help        Display this help screen.

  --version     Display version information.
mtpcmd help info
mtpcmd 1.0.0
Copyright (c) 2020 Tomas "Arci" Kouba

  -m, --manufacturer     Filter device by manufacturer. 

  -n, --friendly-name    Filter device by friendy name.

  --help                 Display this help screen.

  --version              Display version information.

License

MIT

mtpcmd's People

Contributors

tkouba avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Forkers

mumu4u

mtpcmd's Issues

syntax

Could you add the syntax of command line : some samples

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.