@echo off
rem 假设系统日期格式为:2009-06-14 星期日
set day=1%date:~5,2%
set /a day%%=100
copy /y "C:\test\a.txt" "C:\test\%day%"
------解决方案--------------------
------解决方案-------------------- time /t
------解决方案-------------------- rem for DOS/NT echo exit|%comspec% /k prompt $T$_ | find ":" > time.txt
------解决方案-------------------- @echo on rem supoose the current date is 2009-6-15 rem this bat file will make a file at c:\ as 15 and copy the c:\file into file ren if you don't want to get out the command you can change the code as @echo off date /t set day=1%date:~9,2% @echo make file as date time .for example 15 md c:\%day% echo the "c:\files " means what file you want to copy to the datetime file echo copy /y "c:\file" "c:\%day%"
------解决方案-------------------- date time/t