media-device-copier

A Windows command-line utility for copying files from phones and other media devices connected as MTP devices.


Project maintained by drittich Hosted on GitHub Pages — Theme by mattgraham

media-device-copier

Media Device Copier is a Windows command-line utility for copying files to and from phones and other devices connected via MTP (Media Transfer Protocol).

Easily list connected devices, upload files to your device, or download files from your device—all from the command line.


Features

PS C:\Program Files\MediaDeviceCopier> .\MediaDeviceCopier.exe -h Description: MediaDeviceCopier

Usage: MediaDeviceCopier [command] [options]

Options: –version Show version information -?, -h, –help Show help and usage information

Commands: l, list-devices List the available MTP devices. u, upload-files Upload files to the MTP device. d, download-files Download files from the MTP device.


Use the `list-devices` command to determine the device name you need to pass for the following operations.

Downloading files options:

PS C:\Program Files\MediaDeviceCopier> .\MediaDeviceCopier.exe d -h Description: Download files from the MTP device.

Usage: MediaDeviceCopier download-files [options]

Options: -n, –device-name (REQUIRED) The MTP device we'll be copying files to/from. -s, --source-folder (REQUIRED) The folder we'll be copying files from. -t, --target-folder (REQUIRED) The folder we'll be copying files to. -se, --skip-existing Whether to skip existing files (default: true). -r, --copy-recursive Copy folders recursive (default: false). -p, --filter-subfolder-regex-pattern Optional: Include only subfolders which matches the regular expression pattern. Default copy all subfolders -?, -h, --help Show help and usage information


Uploading files options:

PS C:\Program Files\MediaDeviceCopier> .\MediaDeviceCopier.exe u -h Description: Upload files to the MTP device.

Usage: MediaDeviceCopier upload-files [options]

Options: -n, –device-name (REQUIRED) The MTP device we'll be copying files to/from. -s, --source-folder (REQUIRED) The folder we'll be copying files from. -t, --target-folder (REQUIRED) The folder we'll be copying files to. -se, --skip-existing Whether to skip existing files (default: true). -r, --copy-recursive Copy folders recursive (default: false). -p, --filter-subfolder-regex-pattern Optional: Include only subfolders which matches the regular expression pattern. Default copy all subfolders -?, -h, --help Show help and usage information

## Examples

Copy pictures from an iPhone recursively and skip already-copied images:

MediaDeviceCopier.exe download-files -n “Apple iPhone” -s “Internal Storage” -t “D:\MyPictureFolder” -se -r


Copy all pictures from an iPhone recursively, skip already copied images and only copy folders beginning with 2025:

MediaDeviceCopier.exe download-files -n “Apple iPhone” -s “Internal Storage” -t D:\MyPictureFolder” -se -r -p “^2025.*” ```

Tips


License

MIT License. See LICENSE for details.


Contributing

Contributions, issues, and feature requests are welcome!


Support

If you encounter issues or need help, please open an issue on the repository.


Happy copying!