How to copy or transfer multiple files to Android devices

Last updated on February 22, 2013 by Dan Nanni

ADB (Android Debug Bridge) is a command-line utility that allows you to communicate with Android devices from your computer. Among other things, you can use ADB to copy file(s) to and from Android devices. As of this writing, ADB does not support wildcards to push or transfer multiple files (e.g., *.jpg) to Android devices.

So for example, the following will not work.

$ adb push *.jpg /sdcard/my_photo

If you would like to copy or transfer multiple files to an Android device, use the following trick.

First create a temporary directory, and copy to that directory all files that you want to transfer to your Android device. Then using ADB, push that entire temporary directory to the Android device. ADB will then push all individual files in the directory to the destination location of your Android device. For example:

$ mkdir tmp_dir
$ cp *jpg tmp_dir
$ adb push tmp_dir /sdcard/my_photo
push: tmp_dir/001.jpg -> /sdcard/my_photo/001.jpg
push: tmp_dir/002.jpg -> /sdcard/my_photo/002.jpg
push: tmp_dir/003.jpg -> /sdcard/my_photo/003.jpg
push: tmp_dir/004.jpg -> /sdcard/my_photo/004.jpg
. . . .

Support Xmodulo

This website is made possible by minimal ads and your gracious donation via PayPal or credit card

Please note that this article is published by Xmodulo.com under a Creative Commons Attribution-ShareAlike 3.0 Unported License. If you would like to use the whole or any part of this article, you need to cite this web page at Xmodulo.com as the original source.

Xmodulo © 2021 ‒ AboutWrite for UsFeed ‒ Powered by DigitalOcean