The following will print the current data and time within a windows batch file:
for /f "tokens=2,3,4,5,6 usebackq delims=:/ " %%a in ('%date% %time%') do echo %%c-%%a-%%b %%d%%e
I found this here.
However, if placed within a loop, the initial data and time will get continually printed, and will not be updated to reflect the new time.
How can it be modified to reflect the current time and work within a loop?
Thanks