::echo "MTKLog:/storage/emulated/0/mtklog/ Enter:" & pause% ::抓mtklog @echo off ::set "dir=E:\log" ::echo %dir% ::%cd% == %dir% set "ymd=%date:~,4%%date:~5,2%%date:~8,2%-%time:~0,2%%time:~3,2%%time:~6,2%%time:~9,1%" for /f "delims=" %%i in ('call adb shell getprop ro.product.device') do (set pre=%%i) md "%pre%%ymd%" call adb pull storage/emulated/0/mtklog/ %cd%\%pre%%ymd% call adb pull system/etc/apns-conf.xml %cd%\%pre%%ymd% ::call adb shell getprop ro.product.device > %cd%\%pre%%ymd%\a.txt ::获取设备焦点 call adb shell dumpsys activity | findstr "mFocusedActivity" > %cd%\%pre%%ymd%\focus.txt
window 创建日期格式的文件,并log保存到目录中,文件保存问 run.bat。for默认是以空格和,:;/等标点符号作分割符的,
所以要取得整行内容通常会用"delims="这样的形式来取消for的默认分割符
Window 创建日期格式的文件
最新推荐文章于 2021-07-25 01:08:54 发布