S
S
squidw2019-01-11 09:54:49
Data archiving
squidw, 2019-01-11 09:54:49

How to archive with 7-zip only new files in a Windows directory?

I use this batch file on Windows:

@echo off

set source="D:\test"
set destination="D:\test"
set passwd="Qwerty"
set dd=%DATE:~0,2%
set mm=%DATE:~3,2%
set yyyy=%DATE:~6%
set curdate=%dd%-%mm%-%yyyy%

"C:\Program Files\7-Zip\7z.exe" a -ssw -mx9 -p%passwd% %destination%\backup_%curdate%.7z %source% -sdel

The problem with this script:
- create a 1.txt
batch file, there is a 7z archive in which test \ 1.txt - create a
2.txt batch file, there is
a 7z archive in which the test \ 1.txt, 2.txt files and the where test\1.txt
How to finish this script so that in the D:\test directory, when starting the batch file, it only affects what it did not archive (for me it still compresses as much as possible and encrypts with a password) or possibly excludes 7z archives. I tried the key "-r0 *.7z", but then the batch file stops working.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Radjah, 2019-01-11
@Radjah

As a solution to the backup problem www.cobiansoft.com/index.htm

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question