Created
July 15, 2019 09:26
-
-
Save iwanbolzern/d5243efd072757d595c591257ba3b8df to your computer and use it in GitHub Desktop.
Script to take a screenshot of an Android phone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
adb devices | |
adb shell screencap -p /sdcard/screen.png | |
adb pull -p -a /sdcard/screen.png | |
adb shell rm /sdcard/screen.png | |
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b) | |
For /f "tokens=1-3 delims=/:" %%a in ("%TIME%") do (set mytime=%%a-%%b-%%c) | |
set mytime=%mytime: =% | |
ren screen.png Screenshot_%mydate%_%mytime%.png | |
start Screenshot_%mydate%_%mytime%.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment