Command to create a logfile with a date and time in the filename

Command to create a logfile with a date and time in the filename

Set date and time formatting
For /f "tokens=2-4 delims=/ " %%a in ('date /t') do (set mydate=%%c-%%a-%%b)
For /f "tokens=1-2 delims=/:" %%a in ('echo %time%') do (set mytime=%%a%%b)

CALL :GO>>"C:\<name>_%mydate%_%mytime%.log 2>&1

:GO