rem adb wait-for-device adb root adb remount @echo off for /f "tokens=2 delims==" %%a in ('wmic OS Get localdatetime /value') do set "dt=%%a" set "YY=%dt:~2,2%" & set "YYYY=%dt:~0,4%" & set "MM=%dt:~4,2%" & set "DD=%dt:~6,2%" set "HH=%dt:~8,2%" & set "Min=%dt:~10,2%" & set "Sec=%dt:~12,2%" set "datestamp=%YYYY%%MM%%DD%" & set "timestamp=%HH%%Min%%Sec%" set "fullstamp=%YYYY%-%MM%-%DD%_%HH%-%Min%-%Sec%" rem echo datestamp: "%datestamp%" rem echo timestamp: "%timestamp%" rem echo fullstamp: "%fullstamp%" adb shell /system/bin/screencap -p /sdcard/screenshot.png rem adb pull /sdcard/screenshot.png ./screenshot_%datestamp%%timestamp%.png adb pull /sdcard/screenshot.png ./screenshot_%fullstamp%.png pause exit