FileTrail is a Windows Shell Extension that enhances file management capabilities by adding custom property pages and context menu options to Windows Explorer. Built as a COM-based shell extension using ATL (Active Template Library), it integrates seamlessly with the Windows shell to provide additional file information and operations.
- Property Page Extension: Adds a custom "File Trail" tab to file and folder properties dialog
- Multi-File Support: Works with single files, multiple selections, directories, and drives
- Shell Integration: Seamlessly integrates with Windows Explorer context menus
- File Information Display: Shows detailed information about selected files
- Unicode Support: Full Unicode character support for international file names
- Modern Windows Support: Compatible with Windows 10 and later versions
- Windows 10 or later (x64 recommended)
- Visual Studio 2019 or later for building from source
- Administrative privileges for installation/registration
- Download the latest release from the releases page
- Right-click on the downloaded DLL file and select "Run as administrator"
- Use
regsvr32to register the shell extension:regsvr32 FileTrail.dll
-
Clone this repository:
git clone <repository-url> cd FileTrail
-
Open
FileTrail.slnin Visual Studio -
Select your target configuration:
- Debug/Release: Choose based on your needs
- x64: Recommended for modern systems
- Win32: For 32-bit compatibility if needed
-
Build the solution (
Ctrl+Shift+B) -
Register the built DLL:
regsvr32 x64\Release\FileTrail.dll
After installation, FileTrail automatically integrates with Windows Explorer:
- Right-click on any file, folder, or drive in Windows Explorer
- Select "Properties" from the context menu
- Look for the "File Trail" tab in the Properties dialog
- Click the tab to view additional file information and options
- Individual files (
*) - Multiple file selections
- Directories and folders
- Drive roots
- All file system objects
FileTrail is implemented as a COM server with the following key components:
- CFileTrailShlExt: Main COM class implementing shell extension interfaces
- IShellExtInit: Handles initialization with selected files/folders
- IShellPropSheetExt: Manages property page creation and lifecycle
- IContextMenu: Provides context menu integration
- DialogProc: Handles the property page dialog messages
- PropSheetPageProc: Manages property page lifecycle callbacks
{1B12EB41-A8BD-42F4-8EF6-A3E1BE205172}
FileTrail/
├── FileTrail.cpp # Main COM implementation
├── FileTrail.h # ATL module definitions
├── MainDialog.cpp # Dialog implementation (legacy)
├── MainDialog.h # Dialog class definitions
├── dllmain.cpp # DLL entry points
├── resource.h # Resource definitions
├── FileTrail.rc # Resource file
├── FileTrail.idl # Interface definitions
├── Settings.cpp/h # Configuration management
├── utl.cpp/h # Utility functions
└── wnd.h # Window management helpers
IShellExtInit- Shell extension initializationIShellPropSheetExt- Property sheet extensionIContextMenu- Context menu extension
The shell extension registers itself in several locations:
HKEY_CLASSES_ROOT\*\shellex\PropertySheetHandlers\FileTrailHKEY_CLASSES_ROOT\AllFileSystemObjects\shellex\PropertySheetHandlers\FileTrailHKEY_CLASSES_ROOT\Directory\shellex\PropertySheetHandlers\FileTrailHKEY_CLASSES_ROOT\Drive\shellex\PropertySheetHandlers\FileTrailHKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved
Shell extension not appearing:
- Ensure the DLL is properly registered with
regsvr32 - Check that you have administrative privileges
- Restart Windows Explorer (
taskkill /f /im explorer.exe && explorer.exe) - Verify the registry entries exist
Registration fails:
- Run Command Prompt as Administrator
- Ensure the DLL file is not in use by other processes
- Check Windows Event Log for detailed error messages
Property page not loading:
- Check the Debug Output in Visual Studio for error messages
- Verify the dialog resource (IDD_DIALOG1) exists
- Ensure the property page callback functions are properly implemented
The extension outputs debug information to the Visual Studio Output window when debugging. Look for messages prefixed with "FileTrail:" to track the extension's behavior.
This project is licensed under the GNU Affero General Public License v3.0. See the LICENSE.txt file for full license details.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow ATL/COM best practices
- Ensure proper reference counting for COM objects
- Test with multiple file selections and different file types
- Verify compatibility with different Windows versions
- Add appropriate debug output for troubleshooting
This project builds upon Windows Shell Extension development patterns and ATL framework capabilities. Special thanks to the Windows development community for documentation and examples.
For issues, feature requests, or questions:
- Check the Issues page for existing discussions
- Create a new issue with detailed information about your problem
- Include Windows version, file types tested, and any error messages
Note: This shell extension modifies Windows Explorer behavior. Always test in a safe environment before deploying to production systems.