title: Changing desktop.ini doesn't update folder icon automatically in Windows
body: <p>I'm using this batch script to change the icons of all the folders and sub-folders to the .ico files that are located in the folders. </p>
  
  <p><strong>However the folder icons do not change in Explorer</strong> unless I manually rename <code>desktop.ini</code> file in Explorer to something else and then back to <code>desktop.ini</code> or change the letters to uppercase for example. </p>
  
  <p>I even wrote a batch function to automatically rename the desktop.ini but it doesn't work. </p>
  
  <p>What is the difference between renaming them manually and renaming it from a batch file and how can I make Explorer use the new <code>desktop.ini</code>?</p>
  
  <pre><code>@echo off
  
  for /r %%I in (*.ico) do (
      attrib -r -s "%%~dpI." /S /D 
  
      if exist %%~dpIdesktop.ini (
          del "%%~dpIdesktop.ini"
      ) 
      &gt;&gt;%%~dpIdesktop.ini echo [.ShellClassInfo]
      &gt;&gt;%%~dpIdesktop.ini echo IconResource="%%~nI%%~xI",0
  
      attrib -h desktop.ini /S
      attrib +r -s "%%~dpI." /S /D        
  )
  </code></pre>