{"id":2574,"date":"2011-01-05T00:01:10","date_gmt":"2011-01-05T08:01:10","guid":{"rendered":"http:\/\/www.wambooli.com\/blog\/?p=2574"},"modified":"2011-01-04T20:17:42","modified_gmt":"2011-01-05T04:17:42","slug":"why-the-folder-looks-that-way","status":"publish","type":"post","link":"https:\/\/www.wambooli.com\/blog\/?p=2574","title":{"rendered":"Why The Folder Looks That Way"},"content":{"rendered":"<p>Sorry about the lack of blog post on the 3rd. Yeah, I missed the first post of the new year, but I&#8217;ve just been finishing up yet another major project. Even so, it&#8217;s time for a nerdy post to sate all your Windows geeks out there.<\/p>\n<p>Ever wonder why some folders have special pictures on them and others don&#8217;t? Well, let me tell you how that works.<br \/>\n<!--more--><br \/>\nAny time you modify a folder in Windows, to either change the folder icon or add a background image to the folder window, you&#8217;re editing a secret file called <code>desktop.ini<\/code>.<\/p>\n<p>I believe that file was first introduced with Windows 95, though the INI filename extension leads me to think it might be older than that.<\/p>\n<p class=\"sidebar\">The INI suffix was popular with Windows 3.1. There were way too many INI files, including the over-used <code>win.ini<\/code> and <code>system ini<\/code>. INI might stand for <em>initialization<\/em>, though who really knows?<\/p>\n<p>The <code>desktop.ini<\/code> file is modified when you customize a folder, so there&#8217;s really no need to edit the file directly. That&#8217;s because the Customize tab in the folder&#8217;s Properties dialog box lets you sufficiently mess with things. That rule doesn&#8217;t hold true for the folders pre-created for you by Windows.<\/p>\n<p>Folders such a Documents, Downloads, Music, and others all have pre-assigned icons. Just like folders you modify yourself, those folders have <code>desktop.ini<\/code> files that determine what those icons are.<\/p>\n<p>To view the <code>desktop.ini<\/code> files for those folders, you can use the command prompt: Start a command prompt window: From the Start button menu, choose All Programs, Accessories, then Command Prompt.<\/p>\n<p>Say you want to modify the Downloads folder&#8217;s icon. First, change to the Downloads folder directory: At the Command Prompt window type <code>cd downloads<\/code> and press the Enter key.<\/p>\n<p>To view the <code>desktop.ini<\/code> file&#8217;s contents, type in the command type <code>desktop.ini<\/code> and press the Enter key. You&#8217;ll see something like this:<\/p>\n<pre>[.ShellClassInfo]\r\nLocalizedResourceName=@%SystemRoot%\\system32\\shell32.dll,-21798\r\nIconResource=%SystemRoot%\\system32\\imageres.dll,-184\r\n<\/pre>\n<p>There may be more lines in the <code>destkop.ini<\/code> file in addition to the two shown above. It all depends on how the folder is customized. And, of course, finding out what that cryptic text actually means can be an exercise in futility.<\/p>\n<p>The key item for changing a folder&#8217;s icon is IconResource. That item lists the pathname to a file and then the offset of an icon resource stored in that file.<\/p>\n<p>In the example above, the IconResource item shows the file <code>%SystemRoot%\\system32\\imageres.dll<\/code>. The text <code>%SystemRoot%<\/code> refers to the Windows operating system directory, which on 99.9% of the computers out there is <code>C:\\Windows<\/code>.<\/p>\n<p>Within the file <code>imageres.dll<\/code> are a bunch of icon images. The one at offset -184 is the icon image assigned to the Downloads folder.<\/p>\n<p>If you like, you can edit the desktop.ini file to change the icon. Of course, it helps to know the full list of icons in all the icons files. Even if you don&#8217;t, you can edit the file from the command prompt by typing this command:<\/p>\n<pre>notepad desktop.ini<\/pre>\n<p>Use Notepad to randomly change the icon number, then save the file. When you re-display the Windows Explorer window, it should update the folder&#8217;s icon to match whatever icon number you&#8217;ve selected.<\/p>\n<p>Yeah, this is all nerdy stuff, but I was in the mood.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Sorry about the lack of blog post on the 3rd. Yeah, I missed the first post of the new year, but I&#8217;ve just been finishing up yet another major project. Even so, it&#8217;s time for a nerdy post to sate all your Windows geeks out there. Ever wonder why some folders have special pictures on [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-2574","post","type-post","status-publish","format-standard","hentry","category-main"],"_links":{"self":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2574","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2574"}],"version-history":[{"count":4,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2574\/revisions"}],"predecessor-version":[{"id":2578,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2574\/revisions\/2578"}],"wp:attachment":[{"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wambooli.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}