假设backup.bak 的路径为 c:\backup.bak
copy c:\backup.bak "c:\backup%date:~0,10% %time:~0,5%.bak"
如果是要备份很多文件,例如c:\hello文件夹中有很多文件
@echo off
setlocal enabledelayedexpansion
md c:\good
for /r "c:\hello" %%i in (*.bak) do (set a=%%~ni
copy "%%i" "c:\good\!a!%date:~0,10% %time:~0,5%.bak")
pause
ren backup.bak d:\%DATE:~0,10%.BAK