john john - 1 year ago 191
Android Question

ADB push multiple files with the same extension with a single command

I want to push some files of the same type (

) to the
partition of the phone with a single command. But the wildcard does not work:

adb push *.img /sdcard/

Is there any way I can achieve that?

Answer Source

Copy the *.img files to an empty directory, then push the directory (adb push /tmp/images /storage/sdcard0). adb will push all files in that directory to your designated location.

BTW, /sdcard as a path has been obsolete for quite some time, so please make sure you use a destination that exists and is supported by your device. Most Android 2.x/3.x/4.0 devices use /mnt/sdcard; Android 4.1 uses /storage/sdcard0.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download