Created
February 23, 2019 08:16
-
-
Save Kuanlin-Chen/654c77a8aaead1377051857fb36998f7 to your computer and use it in GitHub Desktop.
Split string by space first, then split the 6th string by colon.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@ECHO off | |
for /f "tokens=1,2,3,4,5,6" %%a in ('adb devices -l') do ( | |
if "%%b" == "device" ( | |
ECHO Serial Number : %%a | |
for /f "tokens=2 delims=:" %%A in ( "%%f" ) do ( | |
ECHO Transport Id : %%A | |
start adb_by_transportid.bat %%A | |
) | |
) | |
) | |
PAUSE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment