I'm currently making a batch-file to write the date and time to a logfile, but I can't find out how to keep the info on the same line of the .log
.
REM Clear the screen
REM ------------------------------------------------------
cls
date /T >> C:\\myTemp\devTracker.log
time /T >> C:\\myTemp\devTracker.log
ECHO Starting Microsoft Visual Studio...
You can access the current date and time from a batch file using the predefined %date%
and %time%
variables without calling date.exe
or time.exe
. Just write them directly to the logfile using echo
.
echo %date% %time% >> C:\mytemp\devtracker.log