I am trying to use the 'adb' binary to copy a bunch of files from an Android device - all from a PowerShell prompt running under Windows 11.
The Android device contains a bunch of files in its removable media ( '/sdcard/' ):
.\adb.exe ls /sdcard/
000045f8 00002000 65e1f6f0 .
000045f8 00001000 65d5165c ..
000081b0 00006374 65e1f65e a.json
000081b0 00003234 65e1f660 b.json
000081b0 00003adf 65e1f662 c.json
000081b0 000048de 65e1f664 d.json
000081b0 00003f5d 65e1f66d e.json
(...)
Copying one of them is not a problem:
.\adb.exe pull /sdcard/a.json
/sdcard/a.json: 1 file pulled, 0 skipped. 1.6 MB/s (11118 bytes in 0.006s)
How do I copy all of them in one go though? (there are hundreds) This:
.\adb.exe pull /sdcard/*.json
adb: error: failed to stat remote object '/sdcard/*.json': No such file or directory
doesn't seem to work.
I am able to do this from MacOS and Linux - by passing the wildcard just like in the command above. Windows 11 however?
Partial answer.
ADB does not interpret the '*' the way you think it does.
.\adb.exe pull /sdcard/.
I do not know of a way to copy just .json files.