A Windows Shell Extension that adds an "Auto Folder" context menu option when right-clicking files in Windows Explorer. When clicked, it creates a new folder named after the file and moves the file into it.
- Adds "Auto Folder" to Windows Explorer context menu
- Creates a folder named after the selected file
- Automatically moves the file into the new folder
- Leaves the folder name in edit mode for immediate renaming
- Supports Windows 10 and later (64-bit)
- Visual Studio 2022 with:
- Desktop development with C++ workload
- Windows 10 SDK
- Open
ShellExt.slnin Visual Studio 2022 - Select Release configuration and x64 platform
- Build the solution
- The DLL will be created in
x64/Release/AutoFolderShellExt.dll
- Copy
AutoFolderShellExt.dllto%SystemRoot%\System32 - Register the DLL:
regsvr32 "%SystemRoot%\System32\AutoFolderShellExt.dll"
- Restart Windows Explorer or log out and back in
- Unregister the DLL:
regsvr32 /u "%SystemRoot%\System32\AutoFolderShellExt.dll"
- Delete the DLL from System32
- Restart Windows Explorer
The shell extension is implemented as a COM server that provides:
IShellExtInitinterface for initializationIContextMenuinterface for the context menu handler
Key files:
ShellExt.h/cpp: Main shell extension implementationdllmain.cpp: DLL entry point and registrationresource.h/rc: String resources and version info
To create a distribution package:
- Build the project in Release/x64 configuration
- Run
prepare_dist.batto create the distribution files - The
distdirectory will contain:- AutoFolderShellExt.dll
- install.bat
- uninstall.bat
- README.txt
This project is licensed under the MIT License - see the LICENSE file for details.