ZTree.com  | ZEN  | About...  

 Index   Back

No, but jhead can set the file date to the EXIF date   [Help!]

By: Laurent Duchastel     Montréal, Québec  
Date: Apr 13,2019 at 07:19
In Response to: No, but jhead can set the file date to the EXIF date (John Baum)

> Thank you, Laurent,
>
> The macro concept is one I have not explored. I found Slobodan
> Vujnovic's web page:
>
>
> and he makes it sound tempting. Countering the temptation are all the
> other things I want to do (or need to do or my good wife wants me to do)
> and the realization that the applicable time I have remaining at age 79
> is an increasingly limiting factor.
>
> In the 1990's I became reasonably skilled at writing Word Basic
> macros. I found it was fun. Then the developers scrapped the concept and
> replaced it with the more powerful (and also more arcane and opaque)
> Visual Basic approach and this organic chemist threw up his hands went
> back to doing tasks 'by hand.'
>
> My day is fast ending and as usual I have much left to finish.
>
> thanks,
> baumgrenze

Hi John,

Just you let you know that F9's menu entries are nothing else than batch commands, the same you could use from command prompt, only with a very little twist and few additional features specific to ZTree. While it can also be used with more powerful PowerShell scripts (which is closer to programming than batch language but that I can't write myself), I use F9 only for very very short one or two lines batch scripts, mostly to launch console or win utilities with some specific arguments.

Take for instance this one:


::Z ZIP [branch] | KEEP | PLAIN
REM #ZTStart "Archiving"
COLOR 1F

:: a Add to Archive
:: -r Recurse subfolders
:: -v100m Create volumes 100mb
:: -stl Set archive time to newest file
:: -mx x (0 | 1 | 3 | 5 | 7 | 9)
:: -p[pwd] Encrypt both file and headers
:: -mhe Encrypt headers
:: -sdel Delete files after archiving

#ZTTools\7z.exe a "%3.zip" * -r -mx9 -stl


Forget all line with REM or :: which are just comments, and the COLOR 1F which is only cosmetic, and you'll see that the "batch" is only one line long. I spent half an hour looking into 7-Zip manual to learn about its command switches and after few tries, came up with that script which basically ZIP the branch to my taste. There are more switches documented in REM than I actually use in that script, but they are there for the purpose of future use only if needed.

I then created a variant of that script with the following:


::- ZIP [branch] | DEL | PLAIN
REM #ZTStart "Archiving"
COLOR 1F

:: a Add to Archive
:: -r Recurse subfolders
:: -v100m Create volumes 100mb
:: -stl Set archive time to newest file
:: -mx x (0 | 1 | 3 | 5 | 7 | 9)
:: -p[pwd] Encrypt both file and headers
:: -mhe Encrypt headers
:: -sdel Delete files after archiving

#ZTTools\7z.exe a "%3.zip" * -r -mx9 -stl -sdel


which looks almost the same but actually Zip AND Delete a branch.

Or take this one I use all the time:

::P RAR [branch] | DEL | 5% | 100Kb | *PERSO DATA* (Encrypted)
REM #ZTStart "Archiving"
COLOR 1F
set /p psswd=<"%USERPROFILE%\3ZK8fzRu2bmy9IfGJxD4.txt"

echo %%psswd%%
pause

:: 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

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


which use WinRAR's console RAR.EXE to archive a branch in rar format with specific parameters, encrypt it with my very personnal password withdrawn from an obsfuscated text filename, and delete branch after having tested files. This is basically my long term storage method for professionnal and personnal files.

Again, it's not macro, but only very very short batch commands.

My F9' menu is only long collection of one to two lines batches. Not extensive macro or programming language.

[image]
[image]
[image]


Laurent Duchastel

67 views      
 

Messages in this Thread

 
94,242 Postings in 11,887 Threads, 347 registered users, 10 users online (0 registered, 10 guests)
Index | Admin contact |   Forum Time: Apr 26, 2019 - 1:55 am EDT  |  Hits:27,538,652  (210 Today )
RSS Feed