I came across a bug in my DOS script that uses date and time data for file naming. The problem was I ended up with a gap because the time variable didn't automatically provide leading zero for hour < 10. So running> echo %time% gives back: ' 9:29:17.88'.
Does anyone know of a way to conditionally pad leading zeros to fix this?
More info: My filename set command is:
which ends up being: C:\Temp\robolog_20100602_ 93208.log (for 9:23 in the morning).
This question is related to this one.