码迷,mamicode.com
首页 > 其他好文 > 详细

一些Bat脚本

时间:2020-12-21 11:58:46      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:lse   bat脚本   debug   date   data   hello   ==   form   shel   

loop脚本

@title z_loop
@echo off
rem ==================
set times=8
rem ==================
set num=1
set /a times+=1
:loop
if not %num% == %times% (
@echo on
rem ------------------begin------------------
rem write here that need to loop
    echo ------------------Loops: %num%------------------
    echo Hello
    
    timeout 1  >nul 2>nul
rem -------------------end-------------------
@echo off
    set /a num+=1
) else (
    goto loopend
)
goto loop
:loopend
echo Done.
@echo on
pause

adb拉Log

@title z_log
@echo off
rem Get SN
set SN="%1"
if "%1" == "" (
    adb wait-for-device
    for /f "delims=" %%i in (‘adb shell getprop ro.serialno‘) do (set SN=%%i))
rem Get format Time
set s_lyear=%date:~0,4%
set s_year=%date:~2,2%
set s_month=%date:~5,2%
set s_day=%date:~8,2%
set s_hour=%time:~0,2%
set s_hour=%s_hour: =0%
set s_minute=%time:~3,2%
set s_second=%time:~6,2%
set s_time_full=%s_lyear%%s_month%%s_day%-%s_hour%%s_minute%%s_second%
set s_time=%s_month%%s_day%%s_hour%%s_minute%
rem Get dir_name
set dir_name=%SN%_%s_time%
mkdir %dir_name%
@echo on
adb -s %SN% pull /data/debug_service/ %dir_name%/debug_service

一些Bat脚本

标签:lse   bat脚本   debug   date   data   hello   ==   form   shel   

原文地址:https://www.cnblogs.com/srczhang/p/14144906.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!