压缩指定目录文件到指定目录的批处理【加上计划任务,可做定制备份】
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