Windows Folder Magic is a small command-line tool that allows for automatic setting folder icons based on if the folder (and it's subfolders) are empty or not. Empty here means that there are actually files and not only folders. This is helpful if you have repeating standard folder structures where only a few folders actually contain content. The tool is written in Java and the download also contains a console wrapper executable. You can specify separate icons for non-empty and for empty folders. 

This is the command-line for all operating systems:

java -jar WindowsFolderMagic
-setDefaultIconFile:C:\example\icons\default-folder.ico -setDefaultIconIndex:0
-setEmptyIconFile:%SystemRoot%\system32\SHELL32.dll  -setEmptyIconIndex:215
-updateFolderIcon:C:\example\folder

This is the command-line for Windows:

And these are the resulting folder icons for the example above. Non-empty folders now have a disk icon:

We use cookies

We use cookies on our website. Some of them are essential for the operation of the site, while others help us to improve this site and the user experience (tracking cookies). You can decide for yourself whether you want to allow cookies or not. Please note that if you reject them, you may not be able to use all the functionalities of the site.