1234567891011121314151617181920212223 |
- @echo on
- adb.exe wait-for-device
- adb shell getprop ro.serialno > d:\test\test.txt
- Setlocal Enabledelayedexpansion
- for /f "delims=" %%i in (d:\test\test.txt) do (
- set /a n+=1 & if !n!==1 set "var=%%i")
- ::if "%var%"=="" (echo 数据为空。) else (echo %var%)
- echo;%var%
- set dir=d:\test\
- set afterfix=.txt
- set result=%dir%%var%%afterfix%
- echo %result%
- echo %var% > %result%
- adb shell "getprop ro.build.version.incremental" > %result%
- move %result% "D:\test2\"
- pause
|