@ECHO OFF
set dst=%date:~0,4%%date:~5,2%%date:~8,2%
if exist backup goto creat_dst
md backup
:creat_dst
if exist backup\%dst% goto xcopy_src
md backup\%dst%
:xcopy_src
xcopy d:\hygl backup\%dst% /e/y
会慢慢多出文件来。想只保留最近七天的文件。。多余的就删除。
请高手帮帮忙啦。。
E:\backup\20071114
20071114
set dst=%date:~0,4%%date:~5,2%%date:~8,2%
if exist backup goto creat_dst
md backup
:creat_dst
if exist backup\%dst% goto xcopy_src
md backup\%dst%
:xcopy_src
xcopy d:\hygl backup\%dst% /e/y
会慢慢多出文件来。想只保留最近七天的文件。。多余的就删除。
请高手帮帮忙啦。。
E:\backup\20071114
20071114

