There are lots of long-winded methods out there that show you how to add / change a folders icon, below is a short C# class method that just gets the job done. To change a folder icon we need to accomplish the following: Ensure the target folder has the ‘System’ attribute applied to it Add a desktop.ini file within the target folder specifying the icon path The Code public static void setFolderIcon(string path, string iconPath, string folderToolTip) { /* Remove any existing desktop.ini */ if (File.Exists(path + @"\desktop.ini")) File.Delete(path + @"\desktop.ini"); /* Write the desktop.ini */ StreamWriter sw = File.CreateText(path …
↧