- FileManipulator
FileManipulator is a C# application designed to organize and categorize media files (photos, videos, and RAW images) based on their metadata. It is a more robust, user-friendly evolution of a PowerShell script previously used for similar tasks.
This application solves the common problem of organizing large collections of media files by:
- Analyzing file metadata (EXIF data, file system creation/modification dates)
- Creating structured folder hierarchies based on date information
- Generating CSV and JSON reports
- Storing file information in a SQLite database for future reference
- Multiple date source options: EXIF, file creation, or modification time
- Support for various image and video formats, including RAW
- MD5 hash generation for file integrity and duplicate detection
- CSV export and JSON console output
- SQLite database integration
- Fully configurable via JSON
Be warned, this code may not be functional as is
I started this project a few years ago and stashed it in Git, I only picked it back up in 2025 because some of its bones became relevant for a new project. I will be updating this with a working version shortly.
- .NET 6.0 or higher
- SQLite (bundled or installable)
- Windows OS (tested environment)
- Clone this repository or download the source code.
- Build the solution using Visual Studio or the .NET CLI.
- Ensure that a valid SQLite database file is accessible (or will be created at runtime).
Edit the appsettings.json
file to set:
-
Edit
appsettings.json
with your desired paths and settings. -
Run the application via terminal or from Visual Studio.
-
Choose from the following options in the main menu:
1
: View file info in JSON format2
: Export info to CSV3
: Import data into the database4
: View database contents0
: Exit
The core processing steps are:
- Configuration Parsing β Reads from
appsettings.json
, validates paths. - File Discovery β Recursively finds supported files (e.g.,
.jpg
,.raw
,.mp4
). - Metadata Extraction β Pulls EXIF and file system dates, and generates MD5 hashes.
- Destination Calculation β Builds folder paths using a structure like:
Year/Month-Year/Day-Month-Year
. RAW images are sorted into aRAW/
subfolder. - Output Options β Export to CSV, view data as JSON, or write to SQLite database.
- (Planned): File movement based on calculated structure.
For full class, service, and interface documentation, refer to docs/PROJECT_FILES.md
.
Each source file contains a structured comment block detailing:
- Purpose and functionality
- Inputs and outputs
- Planned improvements
- Dependencies used
- Expand interface-driven design
- Introduce dependency injection
- Add structured logging
- Improve error handling
- Duplicate detection
- Batch/incremental processing
- File previews
- Enhanced metadata extraction
- Basic GUI frontend
- Progress indicators
- Visual reporting
- Async and parallel file handling
- Stream-based metadata parsing
- Improved memory efficiency
See LICENSE.md for full license details.
- Free to use, modify, and distribute
- Requires source disclosure and attribution
- Contact [email protected]
- Allows closed-source and commercial distribution
Pull requests and issues are welcome. Please:
- Fork the repository
- Create a feature branch
- Submit a detailed pull request
Created and maintained by Joshua Porrata