RAR command line

By xngo on June 18, 2019

SET Unique=%date%_%time%
SET Unique=%Unique:/=.%
SET Unique=%Unique::=.%
SET Unique=%Unique: =%
SET Unique=%Unique:Mon=%
SET Unique=%Unique:Tue=%
SET Unique=%Unique:Wed=%
SET Unique=%Unique:Thu=%
SET Unique=%Unique:Fri=%
SET Unique=%Unique:Sat=%
SET Unique=%Unique:Sun=%

REM -k: Lock archive. Prevent accidental modification from RAR.
REM -rr10: Add 10% recovery records.
REM -m5: Max compression
rar a -k -m5 -rr10 -hpYOUR_PASSWORD tax_%Unique%.rar tax
 
rar a -k -m5 -rr10 lease_%Unique%.rar Lease

About the author

Xuan Ngo is the founder of OpenWritings.net. He currently lives in Montreal, Canada. He loves to write about programming and open source subjects.