JustPaste.it

@echo off
cd "C:\Program Files\7-Zip\"

set base_archive=E:\= RAIN\== Wallet Backups\= 7zip Differential Backups\Wallets C-Disk .7z
set archive_folder=E:\= RAIN\== Wallet Backups\= 7zip Differential Backups
set file_list="C:\*wallet*.dat" "C:\*wallet*.bak" "C:\*wallet*.old" "C:\*.conf"

echo Output folder is %archive_folder%
echo Main archive name is %base_archive%
echo Looking on C: for %file_list%
echo.
echo.

IF EXIST "%base_archive%" GOTO create_differentials ELSE GOTO create_main_archive

:create_main_archive
echo %base_archive% for C: not found! Creating it next... Hold on!
echo.
echo.
7z u "%base_archive%" -xr!windows\* -xr!?Recycle.Bin\* -r %file_list%
goto :eof

:create_differentials
echo %base_archive% for C: found, updating any changed or new files (even when in use)... Hold on!
echo.
echo.
7za u -mx9 -slp -snh -snl -ssw "%base_archive%" -xr!windows\* -r %file_list% -u- -up0q3r2x2y2z0w2!"%archive_folder%\Wallets C-Disk %DATE:~-4%-%DATE:~7,2%-%DATE:~4,2%_%TIME:~0,2%h%TIME:~3,2%.7z"
goto :eof

REM https://sourceforge.net/p/sevenzip/discussion/45798/thread/1e2eefc3be/
REM 7za u -mx9 -slp -snh -snl -sns -ssw "E:\= RAIN\== Wallet Backups\= 7zip Differential Backups\Wallets C-Disk .7z" -xr!windows\* -r "C:\*wallet*.dat" "C:\*wallet*.bak" "C:\*wallet*.old" "C:\*.conf" -u- -up0q3r2x2y2z0w2!"E:\= RAIN\== Wallet Backups\= 7zip Differential Backups\Wallets C-Disk %DATE:~-4%-%DATE:~7,2%-%DATE:~4,2%_%TIME:~0,2%h%TIME:~3,2%.7z"

:eof