Sign in with
Sign up | Sign in
Your question

Folder Icons (Desktop.ini)

Last response: in Windows XP
Share
July 7, 2005 4:06:02 PM

Archived from groups: microsoft.public.windowsxp.general (More info?)

For easy recognition, all folders in my data are assigned an Icon.
The Desktop.ini files in each folder point to a specific Icon Folder
which is never moved, so that the icons are always visible in Explorer View.

What baffles me is that in moving or copying data folders, the icon is not
always visible, even after an F5 refresh. The Desktop.ini file are copied, but
the icons are still not visible. This requires the laborious right-clicking
each folder Properties, change Icon etc. Then and only then the icons are
visible again.

(N.B. this usually happens when copying files either from a CD/DVD or from a
Windows Briefcase, to another folder)
If the path to the icon is correct and the ini file is present, why does
this happen?

--
Twanny
July 8, 2005 5:10:02 AM

Archived from groups: microsoft.public.windowsxp.general (More info?)

Hello?
Any suggestions please?
Thanks

"Twanny" wrote:

> For easy recognition, all folders in my data are assigned an Icon.
> The Desktop.ini files in each folder point to a specific Icon Folder
> which is never moved, so that the icons are always visible in Explorer View.
>
> What baffles me is that in moving or copying data folders, the icon is not
> always visible, even after an F5 refresh. The Desktop.ini file are copied, but
> the icons are still not visible. This requires the laborious right-clicking
> each folder Properties, change Icon etc. Then and only then the icons are
> visible again.
>
> (N.B. this usually happens when copying files either from a CD/DVD or from a
> Windows Briefcase, to another folder)
> If the path to the icon is correct and the ini file is present, why does
> this happen?
>
> --
> Twanny
>
September 30, 2008 8:17:46 PM

Hello,

I had a a same "problem". You have to change the folder attributes.

exp.:

After when I copy the desktop.ini into c:\test give a read only attrib to c:\test.

Zsolt
Related resources
June 27, 2009 2:25:11 AM

I also have the same problem, since quite a while and I cannot find an easy fix.
It's not a big thing, but it's quite annoying.

It seems that there is an internal flag (perhaps in the registry or the directory entry) telling the shell it should lookup for Desktop.ini for the folder icon.

If you customize the icon of a folder, a Desktop.ini file will be created in that folder.
If you create a new folder and copy that Desktop.ini in, it will have no effect.
BUT if you customize the icon of the second folder, then overwrite it's Desktop.ini with the one of the first folder, the second folder will show like the first one.

For some reason, this 'internal flag' is reset on some operations (compression, SVN update, etc.), especially when using applications that are not aware of that flag. All folders then loose their icons.

If anyone finds the trick, thanks for posting it here!
If I find anything, I will let you guys know.
June 27, 2009 3:48:02 AM

I finally found what the 'internal flag' is! (quite simple, actually).

I found the trick by reading that page: http://forums.stardock.com/163152 (although it doesn't fix the problem).

When you customize a folder Icon:
- The folder gets the 'Read-Only' attribute
- Desktop.ini gets 'Hidden' and 'System' attributes

The Desktop.ini attributes have no impact on wheter the folder icon will be displayed.
It's the folder's 'Read-Only' attribute that tells Explorer to read Desktop.ini for icons! :sol: 

But watch out! the confusing thing is that changing the 'Read-Only' status in the Folder properties won't change the folder's attibute!

You have to use the following command line (run "CMD"):
  1. attrib +R folder


If you need to restore a lot of folder icons at the same time:
  1. attrib /S /R +R folder

This will set the 'Read-Only' attribute to all files and folders recursively.

You can then use the shell Properties to remove the 'Read-Only' attribute from all files and folders (without altering the folders' actual 'DOS' 'Read-Only' attribute!)

Hope this helps.

November 20, 2009 4:06:51 PM

Thx for the tip

I just added a "Set folder read-only" context menu item on shell folders to avoid typing the attrib command.
Here, the registry entry I used :

  1. Windows Registry Editor Version 5.00
  2.  
  3. [HKEY_CLASSES_ROOT\Folder\shell\SetReadOnly]
  4. @="Set folder read-only"
  5.  
  6. [HKEY_CLASSES_ROOT\Folder\shell\SetReadOnly\Command]
  7. @="cmd /c attrib +r \"%1\""

(copy-paste the code in a .REG file and merge)
!