media-stow
A .NET tool that compares photos, videos and audio with SHA-256 and provides commands to organise, synchronise and deduplicate files.
- C#
- .NET
- SHA-256
- JSON
Purpose and Scope
A command-line application for comparing and organising local media archives by file content. It provides synchronisation, deduplication, directory comparison and verification commands for photos, videos and audio.
Architecture and Repository Structure
Program.csandCommands/CommandRegistry.cs: service setup and command selection.Commands: separate commands such assync,dedup,verify,compareandextract-common.Services: file access, SHA-256 hashing, terminal logging and user confirmation.Models: media indexes, file records and verification reports.Configuration: application, category and filter settings.
It is a single .NET console application. Archive information is stored in local JSON files without a separate server.
Workflow
sync --init copies source files into a category/extension structure and creates the current.json index. Later sync operations compare disk contents with that index to identify new, removed or misplaced files.
dedup groups files with matching hashes. verify checks directory structure and optional source matches, producing a JSON report. Synchronisation changes are also written to versioned JSON records.
Technical Decisions
HashService computes SHA-256 from file streams, so identity does not depend on filenames. Batch hashing limits parallelism to the processor count.
Indexes and reports are written to temporary files before being moved to their target names. Synchronisation and deduplication offer a preview through -n. File access and user interaction are separate services rather than part of each command’s infrastructure code.
Limits and Validation
Equal content hashes do not mean visual similarity: a re-encoded or edited photo is a different file. Hashing reads each entire file and adds disk-access cost for large archives.
Some commands move or delete files. The reviewed repository has no separate automated test project, so it does not establish a guarantee against data loss. This work did not run the commands on media files.
Sources
Reviewed on 8 September 2026. Reviewed revision (69d56b4).