Winrar自動壓縮備份作業

2021-04-12 18:00:04 字數 795 閱讀 1512

@ 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

:a0if %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

:a1if %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 

rar自動壓縮備份

rem mysql backup start echo off forfiles p d 備份 發布軟體備份 m backup sql d 30 c cmd c del f path set ymd date 0,4 date 5,2 date 8,2 0 time 1,1 time 3,2 tim...

rar自動壓縮備份

rem mysql backup start echo off forfiles p d 備份 發布軟體備份 m backup sql d 30 c cmd c del f path set ymd date 0,4 date 5,2 date 8,2 0 time 1,1 time 3,2 tim...

Windows 自動壓縮檔案

先安裝 winrar cd c program files winrar winrar.exe a df agyyyymmddhhmmback d yasuoback d yasuo pause 將此段文字複製到text檔案,並將檔名字尾名改為bat 說明 cd c program files wi...