ColorCode for "empty" folder?

Please check the FAQ (https://www.xyplorer.com/faq.php) before posting a question...
Surya
Posts: 27
Joined: 05 Jul 2020 22:17

ColorCode for "empty" folder?

Post by Surya »

Hi,
I really like the greyed colorcode for empty folders. But... for folders with an own symbol windows creates automatically a desktop.ini-file in it. For me such a folder is still "empty". How can I create a color code which makes the text of such a folder grey, when it is
either real empty (without anything in it and no desktop.ini, no subfolder, no .lnk, no .url in it)
or if it is "empty" (without any subfolder, .lnk, .url or anything else), but has a desktop.ini?

I made a colorcode like this:
B:prop:#nosubs:2 AND B:prop:!#contains.*.lnk AND B:prop:!#contains.*.exe AND B:prop:!#contains.*.dll AND B:prop:!#contains.*.xys AND B:prop:!#contains.*.dat AND B:prop:!#contains.*.dll AND B:prop:!#contains.*.url AND B:prop:!#contains.*.eml AND B:prop:!#contains.*.zip AND B:prop:!#contains.*.pdf AND B:prop:!#contains.*.doc* AND B:prop:!#contains.*.txt AND B:prop:!#contains.*.od* AND B:prop:!#contains.*.csv AND B:prop:!#contains.*.htm* AND B:prop:!#contains.*.jpg AND B:prop:!#contains.*.jpeg AND B:prop:!#contains.*.png AND B:prop:!#contains.*.ico AND B:prop:!#contains.*.mp* //empty folders

But it doesn't work and also it is really long and hard to edit.
I appreciate your help :-)
Thanks in advance, Surya
Last edited by Surya on 25 Apr 2023 17:52, edited 1 time in total.

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: ColoCode for "empty" folder?

Post by sl23 »

Sounds interesting, how do you use a colour code for empty folders? Is it a tweak or is it in the preferences?

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: ColoCode for "empty" folder?

Post by klownboy »

Sounds interesting, how do you use a colour code for empty folders? Is it a tweak or is it in the preferences?
Just for an example. Hopefully others will post additional examples of color coding.
B:prop:#empty:2|pf //s-shape, w-wide, f-frame,b-2pixels This one is for an empty folder. It displays as a framed box, lightly colored inside. It's done in Configuration under Color Filters.
empty folder.jpg
empty folder.jpg (6.95 KiB) Viewed 624 times
Last edited by klownboy on 25 Apr 2023 16:41, edited 1 time in total.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: ColoCode for "empty" folder?

Post by admin »

Note that it's even one of the factory default color filters:
B:prop:#empty:2|fl //empty folders

Surya
Posts: 27
Joined: 05 Jul 2020 22:17

Re: ColorCode for "empty" folder?

Post by Surya »

@sl23: In the configuration >colour & styles >colour code. There I try to make a new colour code (textcolour grey) for "empty" folders (real empty or with only "desktop.ini" in it). But it doesn't work- means, "empty" folders are sometimes and sometimes not text-grey and folders with stuff in it are also sometimes text-grey and sometimes not text-grey.

@klownboy (& admin): Your code is the same as the default "empty" color-code, but only with another colour. That wasn't my question. I like the simple colour-code "text grey".
What I try to achieve is:
Not only real empty folders (code "B:prop:#empty:2 //empty folders"), but also folders, in which is nothing else than only "desktop.ini"-file.
And such folders to be color-coded "text-grey". But, as I said, the colour-defining is not my problem. My problem is the defining of "emtpy" folders, like I described above.

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: ColoCode for "empty" folder?

Post by klownboy »

Surya wrote: 25 Apr 2023 16:36 @klownboy (& admin): Your code is the same as the default "empty" color-code, but only with another colour. That wasn't my question.
Sorry, I updated my post to reflect that, at that moment, I was only answering sl23 post.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Surya
Posts: 27
Joined: 05 Jul 2020 22:17

Re: ColoCode for "empty" folder?

Post by Surya »

@klownboy: Ah okay, no problem ;-)

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: ColorCode for "empty" folder?

Post by sl23 »

Thank you for the tips. I'll look into that later.

sl23
Posts: 223
Joined: 03 Feb 2015 23:34

Re: ColorCode for "empty" folder?

Post by sl23 »

Just trying this out and it works ok, I changed the colour and looking good. But as we're talking empty folders, can I ask why I am getting some folders displaying no files yet say there are several hidden files?

These aren't system folders. I use mostly portable apps, and am finding situations where the files have been moved or deleted leaving an empty folder, except I get a message in the folder stating there are these hidden items, it states how many there are, but I am unable to find out what is in there. Even Windows Explorer doesn't show them with hidden files option turned off. So out of curiosity, what is that about?

Also, I have the same question as the OP, how to ignore the desktop.ini files that are in empty folders?

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: ColorCode for "empty" folder?

Post by klownboy »

Surya wrote: 25 Apr 2023 16:36 Not only real empty folders (code "B:prop:#empty:2 //empty folders"), but also folders, in which is nothing else than only "desktop.ini"-file.
Hi Surya, so to paraphrase, you're looking for a color filter that will not only indicate an empty folder but also indicate a folder as empty if a folder only contains desktop.ini. So, in other words, the filter would basically ignore a desktop.ini file and still reflect the folder as empty.

I've tried a few things like using a prefilter of //||filternot:desktop.ini and I've had no luck in my attempts. Though I'm not so up on color filter syntax. Maybe someone else would be able to help.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Surya
Posts: 27
Joined: 05 Jul 2020 22:17

Re: ColorCode for "empty" folder?

Post by Surya »

@klownboy: Thanks nevertheless for trying!

@sl23: Now we're 2 with this wish ;-)

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: ColorCode for "empty" folder?

Post by admin »

It's not so hard after reading the Help ;)
B:prop:#contains.desktop.ini:1 AND B:prop:#itemcount:1

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: ColorCode for "empty" folder?

Post by klownboy »

admin wrote: 27 Apr 2023 08:15 It's not so hard after reading the Help
Thanks Don that works for that condition. I did read the Help file, but I had the wrong approach. I was trying to come up with a single filter that would apply to both conditions, a folder with no content and a folder with nothing but a desktop.ini. I haven't tried yet to use both B:prop:#empty:2|pf //s-shape, w-wide, f-frame,b-2pixels and B:prop:#contains.desktop.ini:1 AND B:prop:#itemcount:1 in a single color filter.

Edit: I was able to combine the 2 color filters and it works with,
B:prop:#empty:2 OR B:prop:#contains.desktop.ini:1 AND B:prop:#itemcount:1|pf //s-shape, w-wide, f-frame,b-2pixels I need to experiment a some more to get the boxed frame for both conditions.

Done! Take out the |pf //s-shape, w-wide, f-frame,b-2pixels at the end if you don't want the frame.
Last edited by klownboy on 27 Apr 2023 12:20, edited 1 time in total.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

admin
Site Admin
Posts: 60357
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: ColorCode for "empty" folder?

Post by admin »

OR it:
B:prop:#contains.desktop.ini:1 AND B:prop:#itemcount:1;B:prop:#empty:2 //folders empty, or containing only Desktop.ini

Ah, you were faster. :)

klownboy
Posts: 4109
Joined: 28 Feb 2012 19:27

Re: ColorCode for "empty" folder?

Post by klownboy »

It's not a bad idea having a color filter for a folder containing only a desktop.ini file, but it some ways, it may be better to keep the filters separate -one filter indicates a totally empty folder, and another is for a folder containing only a desktop.in file - so you can have them with a different color definition. Though maybe you could use that color filter m-switch: merge to indicate the different conditions.
Windows 11, 22H2 Build 22621.1555 at 100% 2560x1440

Post Reply