Lets say if I have to print time and date three times, I have to write
echo %date% %time%
echo %date% %time%
echo %date% %time%
The above code prints three different times, if I assign %date% %time% to a variable (to avoid writing them each time) then it is printing constant value three times,
set a=%date%_%time%
echo %a%
echo %a%
echo %a%
I however want to create the %a%
variable once, and still echo the actual date and time as they change.