Special Background Colour for Zip Files

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

mjbrookes
Bronze Member
Bronze Member
Posts: 124
Joined: 2007 Sep 19, 11:24

Re: Special Background Colour for Zip Files

Post by mjbrookes »

Hello Nikos.

I downloaded 3.2.0.2 [Unicode] 21/04/2016 yesterday, and discovered the new Advanced Setting for " Archive Folder Background".

WONDERFUL!!

I spent several hours experimenting and even downloading your Browsable Compressed Archives NSE (http://zabkat.com/blog/compressed-folde ... ension.htm) to experiment with some other archive types.

Its Great ...

I don't understand how it works but it just does.
Any multi-file-container that I can open with xplorer2 now displays with an informative background colour.
AND I can still use right-mouse-click-Menu to open the original archiver program (in my case 7zip) when I want to do technical archiving stuff.

:beer:

regards
Mark



PS... a beer is on it's way (http://zabkat.com/donate_x2.htm)
(I found your donate page be "searching" the web site, may I suggest adding a small link to that page from the home page. Just so that people who want to find it can do so a little more easily)
Last edited by mjbrookes on 2016 May 10, 11:07, edited 1 time in total.
mjbrookes
Bronze Member
Bronze Member
Posts: 124
Joined: 2007 Sep 19, 11:24

Re: Special Beckground Colour for Zip Files

Post by mjbrookes »

nikos wrote: in the beginning I misunderstood the suggestion. Now the idea is that if xplorer2 is browsing inside a zipfolder (which is a special kind of folder) it could have a custom background color. That's easy and no zebras in sight :)
Hi Nikos,

I have started using Veracrypt to store encrypted copies of files into a multi-file-container. Are these similar enough to zip-files that it would be easy to add a background colour - once I have "mounted" the files using veracrypt.exe?
ie - once veracrypt.exe has created a new virtual Drive letter, I would like the new virtual drive to have a special background colour.

if it is practicable, please may I add it to the request ideas as a future development.
I think it would be a useful refinement ... Even though Kilmatead did threaten to shoot all smart alec's on sight if they had new requests, I now see that he is from Dublin, so I should be safe (because I live in a small village in the Peruvian mountains :evil: ).

Regards
Mark
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Re: Special Background Colour for Zip Files

Post by nikos »

I don't know... when you "mount" these encrypted folders, are they normal filesystem or something funny? Do they have real c:\kind\of\paths ?
mjbrookes
Bronze Member
Bronze Member
Posts: 124
Joined: 2007 Sep 19, 11:24

Re: Special Background Colour for Zip Files

Post by mjbrookes »

nikos wrote:I don't know... when you "mount" these encrypted folders, are they normal filesystem or something funny? Do they have real c:\kind\of\paths ?
As far as I can tell, once I have used veracrypt.exe to mount the container (and told it a drive letter to use) the folders/files appear completely normal. However the drive letter has not existed before this point and stops existing when I tell veracrypt.exe to dismount it (or switch off the computer)

I attach a screen dump; using two copies of xplorer2 to show as much folder/path information as I can think of.
In the example:-
-Drive J is a USB stick,
--which stores the 10Gb encrypted container (it can be any name; I have chosen to make it's nature clear within the name)
--and a batch file which does all the complex stuff to mount and dismount the container (all I have to remember is the password)
--I have used custom colours to give the container's file-name a special colour

-Drive V is the virtual drive,
--showing the contents of "~BU__Marks_Documents__vc-container.VC" after it has been mounted
--currently I am utilising about 5.9Gb of the 10Gb container
--in the extra xplorer2-window I also show a couple of other browsed folders within the virtual-drive

PIC1
x2scrap-A.png

--once the virtual-drive is mounted I use it like any other drive. EG I can Mirror-browse the source/Master folders and the Backup folders
--I would like to be able to give the virtual-drive's panes a special background colour (because the files themselves exist within the source-container-file)

PIC2
x2scrap2-A.png
I hope this provides the information you needed

Does it seem practicable?


Regards
Mark
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Re: Special Background Colour for Zip Files

Post by nikos »

from what you are saying, this mounted drive letter appears as a normal externsl hard disc, so xplorer2 can't tell it is special
mjbrookes
Bronze Member
Bronze Member
Posts: 124
Joined: 2007 Sep 19, 11:24

Re: Special Background Colour for Zip Files

Post by mjbrookes »

nikos wrote:from what you are saying, this mounted drive letter appears as a normal externsl hard disc, so xplorer2 can't tell it is special
What would xplorer2 need to be able to establish that the mounted folders were special?
(how does xplorer2 know that zip/archive files are special?)

When I have a mounted/virtual drive it shows up in xplorer2; but Windows Disk-Management does not show it as a real drive ... is that special?
x2scrap.png

.... I am really trying to highlight when I am browsing within a multi-file-container
Identifying mounted/virtual drives is a substitute

regards
Mark
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Re: Special Background Colour for Zip Files

Post by nikos »

theoretically xplorer2 could check each folder that looks "normal" whether it is not in the device manager, but that would be too much of a burden for 99.9% of normal use
mjbrookes
Bronze Member
Bronze Member
Posts: 124
Joined: 2007 Sep 19, 11:24

Re: Special Background Colour for Zip Files

Post by mjbrookes »

Okay Nikos,

Thanks for giving the matter some thought. If in the future a "good idea" occurs to you, please re-consider.

regards
Mark
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: Special Background Colour for Zip Files

Post by Kilmatead »

The "poor-man's" solution (which is what was used before x2 had the archive-colour setting) is to create a colour-rule that checks if 'Path [S]' includes any specific text, even that of having an unusual drive-letter would work; if your virtual drive is always configured as drive "J:" or "Z:" (or whatever) then a rule checking for that would apply.

Naturally, this renders all other rules moot, so your contents when viewing that drive would never be colour-filtered, but that's why it's the poor-man's solution. Just an idea. :shrug:
mjbrookes
Bronze Member
Bronze Member
Posts: 124
Joined: 2007 Sep 19, 11:24

Re: Special Background Colour for Zip Files

Post by mjbrookes »

Hi Kilmatead

yep, I remember your above post (2014 May 16, 22:59) which gave examples.
Your point about this method switching-off my other useful colour rules has so far deterred me form using this method ... although I am re-considering the benefits..

as you are very knowledgeable, may I try out some ideas ? ...

** isn't there supposed to be a file attribute for 'encrypted' files? That might be useful if only I knew how to switch it on. I could then colour-code using that attribute

** is it possible for me to add a 'dummy' attribute to each file? I could then treat that as my 'encrypted-file' flag

** do you know of any other sorts of multi-file-containers? If I could think of a general method I would prefer it over one which worked just for my Veracrypted files



In the absense of a clever/ robust /smart-alec method ... my poor mans SOLUTION would be totally dependant on me organising my files and folders correctly (fortunately I am famous for my reliability, and accuracy :lol: )


regards
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: Special Background Colour for Zip Files

Post by Kilmatead »

I'm not sure if the FILE_ATTRIBUTE_ENCRYPTED bitwise constant (displayed 'E' in x2) can be electively set by the user or not (I shall do some experiments), and even if it can be, I am unsure of any odd "side effects" which may incur given that the Windows shell has its own mechanism for colour-coding those particular items, and indeed may handle them as spooky Masonic artefacts without consenting the user first. Thus, "the jury is out" on that one, unless other users have more experience than I.

That said, the one elective attribute which you can set manually and which qualifies as a colour-rule is FILE_ATTRIBUTE_OFFLINE which x2 displays as 'O', so a rule which looks for 'O' in Attributes [S] could be applied. There are also those amongst us who consider the archive-attribute 'A' to be mostly superfluous and available for user misdirection... but since it's so common for 3rd-party backup programmes to arbitrarily play with that themselves, long-term reliability can only be discerned from experience.

Other attributes may also be set (as above), however x2 won't display them so they are relatively useless in this context. (Curiously, there are even some unassigned bits in the Windows API bit-enumerations which can be used for bespoke ends themselves [0x00100000 and 0x00200000], but again, x2 is oblivious to these, so I mention them more as amusement than detail.)

Overall, keep in mind that just because x2 colour-coding rules can't be stacked, that doesn't mean that they can't be abused. :twisted: For example, you are free to create duplicates of all (or at least your most important) rules - one for normal files, and one that includes (for example) the condition for a drive-letter or path node, etc. I do this for many of my rules where I use a certain colour for "hidden" folders, and yet I also like to have all folders display in bold-face. Thus, by placing the attribute check for "hidden" above the rule for ordinary folders, I can have bold-faced folders (always) with conditional colouring added. Granted, this exercise can get complicated if you start adding things for reparse-folder objects which may be in multiple-states, etc, but you get the idea - messing with rule-precedence can be its own workaround.

Image

I use disc-image backups all the time, and when they are mounted-to-browse I too would prefer to be able to assign a proper background colour to the pane... however, as you have seen, mounted virtual folders are not so simple to distinguish within windows, even on the shell-level (in case you're interested, it gets even messier where USB drives which were once-plugged in, yet are now unplugged, may still be seen within the drive-table as detritus while the letter occupied is itself currently reassigned to a virtual-drive).

Unfortunately, I don't know of a way to declare virtual drives as "special" in such a way as x2 may find them amorously arousing.

All that being said, I would lobby Nikos for a one-off rule-group which could be defined by the user as a trigger for pane-colour (in the same way as archives are now, just user-defined). That he would listen, of course, is another matter altogether... historically, his ex cathedra pronunciations have not always adhered to my whims as closely as one may have preferred. Yet in spite of this, we muddle-on with the greater war at large. :D
Last edited by Kilmatead on 2016 May 13, 18:01, edited 2 times in total.
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Re: Special Background Colour for Zip Files

Post by nikos »

colour yer majesty? ;)
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: Special Background Colour for Zip Files

Post by Kilmatead »

At least you are one of the few around here who knows how to spell it properly. :wink:

Actually, that's what I thought the archive-colour thing was going to be implemented as in the first place - not specifically locked to archives, but as an abstract and more user-configurable thing that had flexibility like a lithe Russian figure skater. Not complaining, mind, but... you know... I just have this thing for Russian figure skaters...
Kilmatead
Platinum Member
Platinum Member
Posts: 4879
Joined: 2008 Sep 30, 06:52
Location: Baile Átha Cliath

Re: Special Background Colour for Zip Files

Post by Kilmatead »

Kilmatead wrote:I'm not sure if [...] I shall do some experiments
Empirically speaking, as MSDN states, and as multiple failures of my own blunt-force-trauma approach to spoofing have now shown, SetFileAttributesW (API) definitively does not enjoy the affections of FILE_ATTRIBUTE_ENCRYPTED. Ah well, it was worth a try. :D
User avatar
nikos
Site Admin
Site Admin
Posts: 16402
Joined: 2002 Feb 07, 15:57
Location: UK

Re: Special Background Colour for Zip Files

Post by nikos »

E attribute is only for windows own encryption, it wouldn't know of custom encryption tools