Did you ever wanted to change the default icons of the Folders in the windows explorer? May be you want to. And you may tried to find the technique. If you could not found that till now then let me tell you that how can you do that. Look at the image above. The name "Learn and Deploy" do not shows any file, but it is a folder. And similarly, the Programmes is also a folder. Now let's discuss the magic behind this.
To do this, what you have to do is to find an icon which you want to be displayed instead of the original/default folder icon. And then you have to prepare a file named Desktop.ini. Put both files inside the folder which you want to change and there is one step more. But let we discuss first what is the file actually (Desktop.ini)
Desktop.ini is used to save the desktop configurations. But here we will use this file to change the icons of the folders and some attributes of that folder. If you want to write a Desktop.ini, then you can. But your desktop.ini may look like this
InfoTip=I hate learning. Let we play, instead....More article text...
OK. Let's discuss this file in detail. The [.ShellClassInfo] is the header of the file and must be present before anything else. The ConfirmFileOp tells that either the folder is a system folder on an ordinary folder. If you equals this to 1, it will be considered as the sytem folder. Windows will popup a message telling that this is a system folder and any change may be dangerous for your system, when you will try to delete or move any file from this folder. NoSharing, name shows that this folder should be shared or not. 1 will not allow to share this folder. and 0 shows doesn't matter if any one share this folder. IconFile is the name of the Icon File which should be replaced by the original icon. IconIndex can be used if you are using icon from an .exe or other file. In that case, you must have to mention the index of the icon. If you are using Stand alone icon file (like with extansion .ico) then this should be 0. InfoTip will display the tip when you will move your cursor on the folder, or when you will select the folder then it will appear on the left pane (when Show as Web Page is true, See above).
That's all. You have created the Desktop.ini file, and you have an icon file. Put them inside the folder. You can hide and make them read only for your safety. But there is no compulsion for this. Now change the attribute of the folder to system. You can do this from the command prompt. Like goto the DOS prompt and then change the folder one step before your folder and then issue the command
Attrib +s <FolderName>
Where <FolderName> is the name of your folder. That's all. Go back to explore your folder. It's icon has been changed.
Just go inside the folder. You should notice onething more. See the picture below.
Notice that at each place, where the folder name appears, your folder's icon is replaced instead of default icon.
This was just the basics of changing the folder icon. You can check more on this topic in the MSDN where they discussed the use of Folder.htt file too to have more changes.
If you think that there is something wrong, then you can contact me at any time. I will be available after 12:00 or before 12:00. I am including the sample with this article. You can check that. Bye upto that time.
Be angry coder with theAngrycodeR