set hms=%time:~0,-3%
set ts=%date:/=%%hms::=%

command > "command-%ts%.log"

例) command-20190721150208.log