2

I'm currently making a to write the date and time to a , 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...
Compo
  • 36,585
  • 5
  • 27
  • 39
RocktheFries
  • 221
  • 2
  • 10

1 Answers1

4

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
Ken White
  • 123,280
  • 14
  • 225
  • 444