1 @echo off 2 set d=%date:~0,4%%date:~5,2%%date:~8,2% 3 set winrar=C:\Program" "Files\WinRAR\WinRAR.exe 4 set srcDir=D:\wwwroot\wzzyw\wwwroot 5 set dstDir=D:\wwwroot\wzzyw\wwwrootbak\ 6 set webPrefix= 7 if not exist %dstDir%%d%.rar 8 start %winrar% a -r %dstDir%%d%.rar %srcDir% 9 @echo on