set h=%time:~0,2% set h=%h: =0% set bak_filename=%date:~0,4%%date:~5,2%%date:~8,2%%h%%time:~3,2%%time:~6,2% 返回如下:20121212093639