Skip to content

A Windows utility to manage and persist custom folder icons. Extracts icons from resource files (DLL, EXE) and installs them locally alongside folders, making custom icons portable and resilient to source file changes.

License

Notifications You must be signed in to change notification settings

guwidoe/FolderIconManager

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Folder Icon Manager

A Windows utility to manage and persist custom folder icons. Extracts icons from resource files (DLL, EXE) and installs them locally alongside folders, making custom icons portable and resilient to source file changes.

Build

Download

πŸ“₯ Download Latest Release

Download Description
FolderIconManager-GUI-win-x64.zip GUI application (recommended)
FolderIconManager-CLI-win-x64.zip Command-line interface
FolderIconManager-win-x64.zip Both GUI and CLI

Quick Start

  1. Download FolderIconManager-GUI-win-x64.zip
  2. Extract to any folder
  3. Run FolderIconManager.GUI.exe

No installation required β€” self-contained, portable executables.

The Problem

Windows custom folder icons are configured via desktop.ini files that point to icon resources in external files (like shell32.dll or application executables). When these source files move, update, or get deleted, folder icons break.

The Solution

This tool:

  1. Scans your folder structure for existing custom folder icons
  2. Extracts icons from their source files (with all resolutions preserved)
  3. Installs the icons locally in each folder
  4. Updates desktop.ini to reference the local icon
  5. Applies correct file attributes (hidden, system, read-only)

The result: self-contained folder icons that survive source file changes.

GUI Application

The easiest way to use this tool is through the graphical interface:

  1. Run FolderIconManager.GUI.exe
  2. Click Browse to select a folder to scan
  3. Click Scan to find all folders with custom icons
  4. Review the list β€” icons are color-coded by status:
    • 🟒 Local β€” Already using a local icon file
    • 🟠 External β€” Using icon from DLL/EXE (can be fixed)
    • πŸ”΄ Broken β€” Icon source file is missing
  5. Click Fix All External to extract and localize all external icons
  6. Watch the log panel for detailed progress

CLI Usage

The command-line tool is called fim (Folder Icon Manager).

Scan for Folder Icons

# Scan current directory recursively
fim scan

# Scan specific path
fim scan "D:\Projects" --recursive

# Show only folders with broken icons
fim scan "D:\Projects" --broken

# Show only folders with external (non-local) icons
fim scan "D:\Projects" --external

Extract a Single Icon

# Extract icon from a DLL
fim extract "C:\Windows\System32\shell32.dll,4" "output.ico"

# Extract from an EXE
fim extract "C:\Program Files\MyApp\app.exe,0" "app-icon.ico"

# Extract from ICO file (copies with validation)
fim extract "existing.ico" "copy.ico"

Fix All Folder Icons

# Preview what would be done
fim fix "D:\Projects" --dry-run

# Fix all external icons in a directory tree
fim fix "D:\Projects" --recursive

# Force re-extraction even if local icon exists
fim fix "D:\Projects" --force

Inspect a Folder

fim info "D:\MyFolder"

How It Works

desktop.ini Structure

Windows uses desktop.ini files to customize folder appearance:

[.ShellClassInfo]
IconResource=shell32.dll,4
InfoTip=My custom folder
ConfirmFileOp=0

What This Tool Does

  1. Finds desktop.ini files with IconResource or IconFile entries
  2. Extracts the referenced icon with ALL available resolutions (16x16 to 256x256)
  3. Saves as folder.ico in the same folder
  4. Updates desktop.ini to use the local icon:
    [.ShellClassInfo]
    IconResource=folder.ico,0
  5. Sets attributes:
    • folder.ico: Hidden + System
    • desktop.ini: Hidden + System
    • Parent folder: Read-Only (required for shell to read desktop.ini)
  6. Notifies Windows Explorer to refresh the icon cache

Icon Extraction Details

Icons are extracted with all embedded resolutions preserved:

  • Common sizes: 16x16, 24x24, 32x32, 48x48, 64x64, 128x128, 256x256
  • All color depths: 4-bit, 8-bit, 32-bit (with alpha)
  • PNG-compressed high-resolution images (Vista+)

This ensures icons look crisp at any DPI and in any view mode.

Supported Source Formats

  • .exe β€” Windows executables
  • .dll β€” Dynamic link libraries
  • .ico β€” Icon files (copied directly)
  • Any PE file with icon resources

Building from Source

Prerequisites

  • Windows 10/11
  • .NET 8.0 SDK
  • (Optional) Inkscape or ImageMagick for high-quality icon conversion

Build

git clone https://github.com/guwidoe/FolderIconManager.git
cd FolderIconManager
dotnet build

The build process automatically converts AppIcon.svg to AppIcon.ico for the application icon. For best quality:

  • Install Inkscape (recommended)
  • Or install ImageMagick
  • Otherwise, a built-in .NET fallback will be used

Publish Self-Contained Executables

# GUI application
dotnet publish src/FolderIconManager.GUI -c Release

# Command-line interface  
dotnet publish src/FolderIconManager.CLI -c Release

Run Tests

dotnet test

Customizing the Application Icon

The application icon is defined in AppIcon.svg at the repository root. To customize:

  1. Edit AppIcon.svg with your preferred SVG editor
  2. Run dotnet build β€” the icon will automatically be converted to AppIcon.ico
  3. The icon appears in:
    • The .exe file icon (Windows Explorer)
    • The application window title bar
    • The taskbar when running

Project Structure

FolderIconManager/
β”œβ”€β”€ AppIcon.svg                 # Application icon source (SVG)
β”œβ”€β”€ Directory.Build.props       # Centralized build configuration
β”œβ”€β”€ build-tools/                # Build-time utilities
β”‚   └── ConvertSvgToIco.ps1     # SVG to ICO converter
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ FolderIconManager.Core/ # Core library
β”‚   β”‚   β”œβ”€β”€ Models/             # Data models
β”‚   β”‚   β”œβ”€β”€ Native/             # Windows API P/Invoke
β”‚   β”‚   └── Services/           # Business logic
β”‚   β”œβ”€β”€ FolderIconManager.CLI/  # Command-line interface
β”‚   └── FolderIconManager.GUI/  # WPF desktop application
β”œβ”€β”€ tests/
β”‚   └── FolderIconManager.Tests/ # Unit tests
└── artifacts/                  # Build output (gitignored)
    β”œβ”€β”€ bin/                    # Compiled binaries
    └── obj/                    # Intermediate files

Requirements

  • Windows 10/11 (x64)
  • No .NET runtime required for release downloads (self-contained)
  • .NET 8.0 SDK required only for building from source

License

MIT License β€” see LICENSE.txt

Contributing

Contributions welcome! Please open an issue or PR.

Acknowledgments

About

A Windows utility to manage and persist custom folder icons. Extracts icons from resource files (DLL, EXE) and installs them locally alongside folders, making custom icons portable and resilient to source file changes.

Resources

License

Stars

Watchers

Forks

Packages

No packages published