I was trying to create a new filename with the cuireent date and time from a bat file.
The standard command of %date% and %time% weren’t working as a filename as they crated / and : symbols
Non working example
ren myfile.txt mynewfile-%date%-%time.txt
This won’t work because it would create the file
mynewfile-11/01/2018-11:11:29
Working example using
ren myfile.txt %date:/=% and %time::=%
Creates
mynewfile-14072018-144329.21