Install WinRAR.
The following script backup entire android
folder into a zip file with today's date as file timestamp
-x*\.gradle
is used to exclude certain file/directory/pattern
ECHO OFF
set datestr=%date%
"C:\Program Files\WinRAR\winrar.exe" a -afzip "D:\backup\android-%datestr%.zip" D:\android -x*\.gradle -x*\build -x*\captures -x*.zip
You can reformat the datestr.
REM Convert "Fri 06/01/2018" to "2018-01-06"
ECHO %date%
set datestr=%date:~10,4%-%date:~7,2%-%date:~4,2%
ECHO %datestr%
An easier way is to adjust Windows date and time format. Right click on the Date Time
on the lower right corner of windows, click Adjust date time -> Change date and time format
and select the desired format for Short date
.