Welcome Guest.   Make a donation to an author on the site July 29, 2014, 01:54:50 PM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
Learn about the DonationCoder.com microdonation system (DonationCredits).
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1] 2 Next   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: IDEA: Change folder icon colour when folder empty  (Read 12008 times)
magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« on: October 23, 2011, 12:19:58 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
Logged
skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #1 on: October 23, 2011, 05:53:15 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.
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #2 on: October 25, 2011, 04:06:16 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
Logged
skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: October 25, 2011, 05:44:58 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?
Logged

skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #4 on: October 25, 2011, 09:42:40 PM »

Give this a try:  MT Icon



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:45 PM by skwire » Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #5 on: October 26, 2011, 08:47:43 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.
Logged
skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #6 on: October 26, 2011, 08:50:01 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.
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #7 on: October 26, 2011, 09:11:42 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.
Logged
skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #8 on: October 26, 2011, 09:19:01 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.   embarassed
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #9 on: October 26, 2011, 11:51:55 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 smiley
Logged
skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #10 on: October 26, 2011, 12:20:10 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 smiley

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.
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #11 on: October 28, 2011, 10:53:15 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 smiley
Logged
skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #12 on: October 28, 2011, 10:55:25 AM »

You already can for both the Root Folder and Icon Path edit fields.  You have to drop it specifically on those fields, though.
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #13 on: October 28, 2011, 12:35:59 PM »

Lol, your thinking ahead. I didn't even think of trying it smiley
Logged
mateek
Charter Member
***
Posts: 68


see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #14 on: November 01, 2011, 01:48:24 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? 
Logged

Stop war: GetAnd.   Mobile edition: AndAnd.
skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #15 on: November 01, 2011, 01:56:10 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.
Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #16 on: November 06, 2011, 12:13:56 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
Logged
magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #17 on: November 26, 2011, 02:38:41 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

Logged
Rills
Participant
*
Posts: 7


View Profile Give some DonationCredits to this forum member
« Reply #18 on: June 20, 2012, 10:38:57 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.
Logged
skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: June 20, 2012, 11:27:50 AM »

Hi, Rills, and welcome to DonationCoder.   smiley

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.dcmembers.com/apps/snacks/MTIcon.zip
Logged

pavanusq
Participant
*
Posts: 2

View Profile Give some DonationCredits to this forum member
« Reply #20 on: June 21, 2012, 03:29:36 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
Logged
pavanusq
Participant
*
Posts: 2

View Profile Give some DonationCredits to this forum member
« Reply #21 on: June 21, 2012, 10:07:12 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?

Logged
skwire
Moderator
*****
Posts: 4,021



Another Coding Snack request? Om nom nom...

see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #22 on: June 22, 2012, 09:43:36 AM »

Hi, pavanusq, and welcome to the DonationCoder site.   smiley

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.

Logged

magician62
Supporting Member
**
Posts: 90


View Profile Give some DonationCredits to this forum member
« Reply #23 on: June 22, 2012, 03:59:41 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 smiley )

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.
Logged
Rills
Participant
*
Posts: 7


View Profile Give some DonationCredits to this forum member
« Reply #24 on: June 27, 2012, 04:39:00 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?
Logged
Pages: [1] 2 Next   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.051s | Server load: 0.15 ]