ZTree.com  | ZEN  | About...  

 Index   Back

Encrypt archives if you do   [OT]

By: Laurent Duchastel     Montréal, Québec  
Date: Aug 22,2017 at 12:20
In Response to: a few tricks up in my sleeves (Ryan)

> but do "uploading zip files", like below... maybe daily
> abc01 (w20161021-18-02-00).zip
> abc03 (w20131125-10-30-00).zip
> abc07 (w20170818-15-40-00).zip
> abc02 (w20090227-09-44-00).zip
> abc04 (w20170623-23-42-00).zip
> abc05 (w20131125-10-30-00).zip
> abc06 (w20170818-18-02-00).zip
> abc08 (w20170818-18-28-00).zip
> abc09 (w20170602-15-28-00).zip
> abc10 (w20170602-15-28-00).zip
> zipped file format preserves spaces and all. it can be done fast, 30G
> bytes can be
> done in a couple of hours and not 2~5 days. i will certainly do small
> zip file synching (with 0% compression rate)

Highly recommended: encrypt archives with a password if you load on the cloud, and especially on Mega which popularity is well-known within piracy teams.

Personally, I use Rar.exe, which is the console version of WinRar, because it is both fast and secure, and have lots of command-line options.

Here is one of my F9 scripts to create RAR archives. I use it many times a day. Actually, most of my folders on HD are archived by default, because of lack of space on my 128 SSD hard disk but also because it slightly reduces risks of data loss in case of laptop lost of theft.

Rather than put the password in the script itself or enter it each time, I've decided to put in low-profile but yet plain text file on my computer, and load it at run time. It's 0% secure (and contradicts completely the reduction of risks stated above...), but it's so obscure for most users that it is not a real worry for me. I also echo the password to be sure it has been loaded. You can adapt, of course.

The core of the script itself is one line.
Because I have many variants of that script, I wrote parameters as reference.

::A RAR [branch] | DEL | 5% | 100Kb | rar,zip | HD archiving *ENCRYPTED* *PERSO DATA*
REM #ZTStart "Archiving"
set /p psswd=<"c:\Users\Laurent\KSD384h34.txt"
echo %%psswd%%

:: a Add to Archive
:: -r Recurse subfolders
:: -MA5 Force archiving format v5.0+
:: -md128m Set dictionary size to 128mb
:: -v100m Create volumes 100mb
:: -m3 Set compression method to 3=Normal
:: -ms Store these files instead of archiving
:: default = 7z, ace, arj, bz2, cab, gz, jpeg, jpg, lha, lzh, mp3, rar, taz, tgz, xz, z, zip
:: -rrp5 Add data recovery record (5%)
:: -oi Save identical files as reference (v5.0+ only)
:: -htb Set hash type to Blake2 (256bits, insure files are identicale) (v5.0+ only_

:: -tl Set archive time to newest file
:: -hp[pwd] Encrypt both file and headers
:: -t Test files after archiving
:: -k Lock archive (prevents any further modifications)
:: -df Delete files after archiving

:: -rrp5
#ZTTools\RAR.exe a -r -MA5 -md128m -v100m -m3 -ms -rr5p -oi -htb -tl -hp"%%psswd%%" -t -k -df %3.rar *.*

Because I often compress/decompress folders, here is the parent script:

:: Unrar Single RAR %1 *DECRYPTED*
REM #ZTStart "Decompress"
set /p psswd=<"c:\Users\Laurent\KSD384h34.txt"
echo %%psswd%%

:: x extract files from an archive with full paths
:: -r Recurse subfolders
:: -ad Append archive name to destination path
:: -p Set password

#ZTTools\rar x -r -AD %1 -p"%%psswd%%"

Laurent Duchastel

Thread locked

Messages in this Thread

94,694 Postings in 11,941 Threads, 348 registered users, 21 users online (0 registered, 21 guests)
Index | Admin contact |   Forum Time: Jan 19, 2020 - 4:59 am EST  |  Hits:29,731,588  (2,867 Today )
RSS Feed