I want to save a target file with consecutive numbers:
Scope (1). Zip, Scope (2). Zip .... Scope (s). Zip
7z a-tzip C: \ Backup \ Scope.zip C: \ Program Files \ Scope.mdb?
attach to each file name the date and time
Can anyone tell me if and how I feel?
Use index file to keep track of number.
If index file does not exist write one with value 1
Put number in variable I
Add 10000 to variable I and put in variable J
Run archive command - archive name includes 4 right characters of variable J
Increment variable I by 1
Write variable I to index file
Result: Scope(0001).zip, Scope(0002).zip, ...., Scope(9999).zip ; then rolls over.
IF NOT EXIST C:\Backup\ScopeIndex.dat > C:\Backup\ScopeIndex.dat ECHO;1
SET /P I= < C:\Backup\ScopeIndex.dat
SET /A J=%I% + 10000
7z a -tzip C:\Backup\Scope(%J:~-4%).zip "C:\Program Files\Scope.mdb"
SET /A I=%I% + 1
> C:\Backup\ScopeIndex.dat ECHO;%I%
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.