@ echo off
rem PRD备份文件的压缩
rem 压缩文件,并删除原文件
rem 将文件修改为bat格式,加上系统的计划任务
rem 要添加winrar的路径
rem winrar路径中不能出现空格
if %date:~5,1% == 0 goto a0
if not %date:~5,1% == 0 goto a1
:a0
if %date:~8,1% == 0 (
D:/"Program Files"/WinRAR/winrar a -df e:/PRD_%date:~6,1%-%date:~9,1% e:/%date:~6,1%-%date:~9,1%.txt
) else (
D:/"Program Files"/WinRAR/winrar a -df e:/PRD_%date:~6,1%-%date:~8,2% e:/%date:~6,1%-%date:~8,2%.txt
)
goto end
:a1
if %date:~8,1% == 0 (
D:/"Program Files"/WinRAR/winrar a -df e:/PRD_%date:~5,2%-%date:~9,1% e:/%date:~5,2%-%date:~9,1%.txt
) else (
D:/"Program Files"/WinRAR/winrar a -df e:/PRD_%date:~5,2%-%date:~8,2% e:/%date:~5,2%-%date:~8,2%.txt
)
goto end
:end