topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Sunday December 15, 2024, 12:49 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: IDEA: Change folder icon colour when folder empty  (Read 41960 times)

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
IDEA: Change folder icon colour when folder empty
« on: October 23, 2011, 12:19 AM »
OK first we are working Win 7 (64) and only applicable to List or Details View

Either automatically (unlikely), or by processing a folder and its immediate subfolders (more Likely)

Change the colour of a folder if empty, including folders where thumbs.db is the only file that exists exists

Purpose: I have a folder containing a number of working folders, that I process the contents of. This is to give a quick visual indication of which folders remain to be worked on.

Note, I have a util to remove empty folder, but in this case I do not want to remove them as they will slowly be topped up again, and processed as and when.

TIA
Why an I Magician62? Because Magician1 thru 61 were gone. :)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #1 on: October 23, 2011, 05:53 PM »
There is one caveat and that is the folder icon is just that, an icon.  Changing it's colour will mean choosing another icon to use that may or may not match the icon style you're using.  Does that make sense?  If so, find a free icon that you would like to use (or make one).

http://www.iconfinder.com/
http://www.iconarchive.com/

An alternate icon solution would be to extract the default folder icon from the shell32.dll file and recolour it.  However, I'm uncertain of any potential copyright ramifications of doing that.

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #2 on: October 25, 2011, 04:06 PM »
The way I was thinking of it would be the user assigns an icon path/filename that is then used. This then permits customization per user. With the in-use folder reverting to the standard Icon.  Alternatively if a location for the icon and name is predefined, it would be quite easy for the user to drop the icon they want to use in that location

I have in the past used Rainbow Folders from http://www.english.aionel.net/ and Folderico from Shedko to manually assign a replacement icon
Why an I Magician62? Because Magician1 thru 61 were gone. :)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #3 on: October 25, 2011, 05:44 PM »
The way I was thinking of it would be the user assigns an icon path/filename that is then used.

This will be no problem.  Some other thoughts:

  • To verify, you only want one level of folder recursion below the specified root folder, correct?
  • How about an edit field where you can specify a list of "allowed files" within a folder and still consider it empty?  You could add your "Thumbs.db" there...
  • What if a one-level-down folder contains a folder or folders.  How would you like that handled?

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #4 on: October 25, 2011, 09:42 PM »
Give this a try:  MT Icon

2011-10-25_213757.pngIDEA: Change folder icon colour when folder empty

To see the folder icons change, and depending on your file manager, you may or may not have to refresh the directory after running this tool.  Let me know how it goes.  Thanks.
« Last Edit: October 25, 2011, 10:02 PM by skwire »

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #5 on: October 26, 2011, 08:47 AM »
1/ only one level
2/ great idea as I just found desktop.ini. Though it may be that desktop.ini and thumbs.db are ignored, so its possible that system files are being ignored?
3/Any folder contining folders should be ignored. The reasoning is it will force the user to process each level.
Why an I Magician62? Because Magician1 thru 61 were gone. :)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #6 on: October 26, 2011, 08:50 AM »
Cool, I think I satisfied all your requests, then.  The "desktop.ini" file is automatically excluded (in addition to the filenames you specify) since that is how folder icons get changed.

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #7 on: October 26, 2011, 09:11 AM »
Been testing and a few anomalies have appeared though until the first is resolved its hard to test the rest to see if its my system or other..

Attempt 1
Originally ran MTIcon from the zip, was able to add a root location and run a few tests, it basically functioned, though when I went to change the Root folder it was unable to and the contents dissapeared.

Attempt 2
Extracted MTIcon to a folder on the desktop.

I can select a Root folder from the pop up but nothing is displayed in the field
I can select icon path, and icon path is displayed.

On closing the program, the config.ini is created but RootFolder= is empty

If i manually set a RootFolder in the config, it works, but on attempting to change the RootFolder through teh program clears teh field and subsequently config.ini on close

Its as though the variable for RootFolder is fixed in memory or registry. Will try again after the bext reboot

The only thing then to check is if system files are automatically ignored, which at present it seems. And if all the folders that should be affected are, I have had mixed results so far, though the last test all that should were.
Why an I Magician62? Because Magician1 thru 61 were gone. :)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #8 on: October 26, 2011, 09:19 AM »
I can select a Root folder from the pop up but nothing is displayed in the field

Completely my fault.  Please re-download and test.  Apologies for the trouble.   :-[

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #9 on: October 26, 2011, 11:51 AM »
The only thing I have noticed, and suspect its system related is that sometimes you get all folders processed on the first run, other times its one or two, sometimes necessitating multiple presses (window refresh sometimes does't apper to do it). My first thought was that it might be related to the folder selection i.e. A snapshot is taken of all the folders within, and as i was adding folders for testing it was then not seeing them all.

Would it be possible to tweak the utility so that if a folder subsequently has content and is processed, then the standard system icon is returned.

I have also placed the icon on a shared drive, so the affects are seen across the network! Although I could have just put the .ico on both machines in the same folder.


Further info to my first statement The other machine on the network see's all the folder changes as they happen, and I only get some, untill after a few refreshes !

Is it possible to build into the code some sort of window refresh, which may overcome this?

From my own initial need, I can see the potential as a productivity tool. If at a later time it were extended you could have green for empty, orange to 1-9 items red for 10-99 items blue for 100-999 items .... etc Sell the idea to M$, they can incorporate it in Windows 2020, assuming we still have folders by then :)
Why an I Magician62? Because Magician1 thru 61 were gone. :)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #10 on: October 26, 2011, 12:20 PM »
Would it be possible to tweak the utility so that if a folder subsequently has content and is processed, then the standard system icon is returned.

I do have code in there to do this.  If a folder is not empty, I do the following:

  • Check for the existence of a desktop.ini
  • If it exists, check the appropriate key.
  • If the key value matches our icon path, assume the desktop.ini is one we made and delete it to restore the normal icon.

Further info to my first statement The other machine on the network see's all the folder changes as they happen, and I only get some, untill after a few refreshes !

Is it possible to build into the code some sort of window refresh, which may overcome this?

I'll see what I can do.  However, like you said, this is almost certainly system-related.  It also depends on the file manager, too.  On my own system, in Altap Salamander, I see the changes immediately.  In Windows Explorer, the changes take a bit of time to see.

From my own initial need, I can see the potential as a productivity tool. If at a later time it were extended you could have green for empty, orange to 1-9 items red for 10-99 items blue for 100-999 items

I already have the code written to support such functionality.

.... etc Sell the idea to M$, they can incorporate it in Windows 2020, assuming we still have folders by then :)

Pfft...we all should be so lucky.  =]  Honestly, this app's functionality is really trivial to do.  The core of it is around 40 lines of AHK code.  Check folder, match stuff, create/delete desktop.ini, set folder with system attribute.  Done.

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #11 on: October 28, 2011, 10:53 AM »
Now I have been using the utility for a solid day, I was wondering if adding the ability to drop the root folder onto the window would be a simple task. I am finding I am processing various folders with the util, because it is so usefull :)
Why an I Magician62? Because Magician1 thru 61 were gone. :)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #12 on: October 28, 2011, 10:55 AM »
You already can for both the Root Folder and Icon Path edit fields.  You have to drop it specifically on those fields, though.

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #13 on: October 28, 2011, 12:35 PM »
Lol, your thinking ahead. I didn't even think of trying it :)
Why an I Magician62? Because Magician1 thru 61 were gone. :)

mateek

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 78
    • View Profile
    • NewPray.com - A description of a broken window for world peace, law proposals, prophecy explanations, conspiracies, and more.
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #14 on: November 01, 2011, 01:48 PM »
I'm wondering, has anyone used MTIcon with multiple drives?  Does anyone have advice on the best course?  I'm debating whether to try multiple instances by making container folders with different names (maybe renaming the .exe too?) or trying to set the root folder to comma separated locations.  Does it even matter at all which method I choose? 
Stop war, change U.S. Politics, Kabbalah, my case modding, etc: My Website.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #15 on: November 01, 2011, 01:56 PM »
Does it even matter at all which method I choose?

No, because MT Icon doesn't have code in it to support any of the methods you mention.  Currently, if you want to use separate instances of it, you will need to copy the exe into a separate folder and run it from there.

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #16 on: November 06, 2011, 12:13 PM »
With the fact you can drag - drop the directory you want to process, it is very quick. multi-locations are not really necessary, unless your working with lots, then a multi-line field where each line contains a folder to be processed, may be useful

I have now used the util almost every day, and it has saved quite a bit of time.

The only improvements I can see other than above

1- Nested folders ( as mentioned before by Jody)


I have also played with Jody's source code, as I am still trying to get my head around how ahk works (maybe in another 20 years, I will achieve from scratch what Jody's has done here)
But i did succede in getting it to change the icon if it didnt contain a .jpg

Which leads me onto the possibility of multiple rules e.g.

Emtpy folder - red icon
Missing .jpg  - blue icon
Has      .txt  - orange icon

etc

each line would have a selector at the end, and only 1 line selectable

The only other option would be a combined rule where multiple criteria match give a specific colour icon

In all cases the standard yellow folder is displayed as being not needing attention

However thir developes in the future I am sure it will be good
Why an I Magician62? Because Magician1 thru 61 were gone. :)

magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #17 on: November 26, 2011, 02:38 PM »
OK I have been using this great util for some time now and can see a possible improvement in the original idea
The icons would be user defined, though I have created 5 icons set, 1 for each percentage. Each set has several size icons. They are based on the MS icons of Windows 7, though I am not sure if copyright apples as they are modifed from the original. Basically they are a standard yellow folder, that fills with red from the bottom. The greater teh content of the folder the more red is shown

Empty folder -      Green
<100MB               Yellow (default)
100MB-<1GB         25% Red
1GB-<10GB           50% Red
10GB-<50GB          60% Red
50GB-<100GB        80% Red
>100GB               100% Red

Why an I Magician62? Because Magician1 thru 61 were gone. :)

Rills

  • Participant
  • Joined in 2012
  • *
  • Posts: 7
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #18 on: June 20, 2012, 10:38 AM »
Hi there!

I am look for some software that does exactly what you are describing here.  Is this software available for use?  I am afraid have have never been on this forum before so I don't really know what it is about.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #19 on: June 20, 2012, 11:27 AM »
Hi, Rills, and welcome to DonationCoder.   :)

I am look for some software that does exactly what you are describing here.  Is this software available for use?  I am afraid have have never been on this forum before so I don't really know what it is about.

There's a link to the initial software I wrote in one of the previous posts.  You can download the file here:  http://skwire.dcmemb...ps/snacks/MTIcon.zip

pavanusq

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #20 on: June 21, 2012, 03:29 AM »
hi SKWIRE
i downloaded MTIcon, but how to assign Folder size or how the Folder changes Blue or any colour?
i am using Windows 7.
i am looking for a program which detects empty folder and change it's colour or give some identification, i don't want delete empty Folders.

Thanks for your Help

pavanusq

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 2
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #21 on: June 21, 2012, 10:07 PM »
OK I have been using this great util for some time now and can see a possible improvement in the original idea
The icons would be user defined, though I have created 5 icons set, 1 for each percentage. Each set has several size icons. They are based on the MS icons of Windows 7, though I am not sure if copyright apples as they are modifed from the original. Basically they are a standard yellow folder, that fills with red from the bottom. The greater teh content of the folder the more red is shown

Empty folder -      Green
<100MB               Yellow (default)
100MB-<1GB         25% Red
1GB-<10GB           50% Red
10GB-<50GB          60% Red
50GB-<100GB        80% Red
>100GB               100% Red



Hi Magician62
how can you assign these Size, do we need any special app?


skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #22 on: June 22, 2012, 09:43 AM »
Hi, pavanusq, and welcome to the DonationCoder site.   :)

i downloaded MTIcon, but how to assign Folder size or how the Folder changes Blue or any colour?

I never added the folder size stuff to MT Icon; it only sets the icon if a folder is empty.

i am looking for a program which detects empty folder and change it's colour or give some identification, i don't want delete empty Folders.

The current version of MT Icon does not delete empty folders.


magician62

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 180
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #23 on: June 22, 2012, 03:59 PM »
I found a few situations it doesn't seem to work, but its been a while IIRC one was Network mapped drives and NAS. When I get a moment I will see if i can test the ways I used it and list the places it had issues (Win7-64)

I created icons based on the windows ones that show different red/yellow ratios , but the code was not modified ( not clever enough yet :) )

If anyone wants the icon packs I can probably make them available, though I am not sure how copyright stands on them. I got the base image from a program that colourised folders. Though on making the image a negative it looked like the basic MS icon.
Why an I Magician62? Because Magician1 thru 61 were gone. :)

Rills

  • Participant
  • Joined in 2012
  • *
  • Posts: 7
    • View Profile
    • Donate to Member
Re: IDEA: Change folder icon colour when folder empty
« Reply #24 on: June 27, 2012, 04:39 AM »
Hi there!  Manyt thanks for the link.  I am being really slow here I know but where would I find an icon to put in the icon path?