SN条码打印及软件版号收集.bat 479 B

1234567891011121314151617181920212223
  1. @echo on
  2. adb.exe wait-for-device
  3. adb shell getprop ro.serialno > d:\test\test.txt
  4. Setlocal Enabledelayedexpansion
  5. for /f "delims=" %%i in (d:\test\test.txt) do (
  6. set /a n+=1 & if !n!==1 set "var=%%i")
  7. ::if "%var%"=="" (echo 数据为空。) else (echo %var%)
  8. echo;%var%
  9. set dir=d:\test\
  10. set afterfix=.txt
  11. set result=%dir%%var%%afterfix%
  12. echo %result%
  13. echo %var% > %result%
  14. adb shell "getprop ro.build.version.incremental" > %result%
  15. move %result% "D:\test2\"
  16. pause