How to change a folder's icon via command line?

  • Thread starter Thread starter Nocturnal
  • Start date Start date
N

Nocturnal

Is there anyway you can change a folder's actual icon and not a shortcut's
icon to a different/customized icon via a command line switch of some sort?
 
Using a Batch file. Sets the icon for folder "C:\Test"

- - -
attrib -h -r c:\test\desktop.ini
echo [.ShellClassInfo] >C:\test\desktop.ini
echo IconFile=%SystemRoot%\system32\shell32.dll>>C:\test\desktop.ini
echo IconIndex=5 >>C:\test\desktop.ini
attrib +h +r c:\test\desktop.ini
attrib +r c:\test
- - -

If you're using a .ICO file, then set the IconIndex to 0.

--
Regards,

Ramesh Srinivasan, Microsoft MVP [Windows XP Shell/User]
Windows® XP Troubleshooting http://www.winhelponline.com


Is there anyway you can change a folder's actual icon and not a shortcut's
icon to a different/customized icon via a command line switch of some sort?
 
Back
Top