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

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?
 
R

Ramesh, MS-MVP

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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top