When MediaCleaner Pro finishes processing, every image file that was acted on by the pipeline is moved into a structured subdirectory tree rooted atDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/xcoder-es/media-cleaner-pro/llms.txt
Use this file to discover all available pages before exploring further.
DEST_DIR. The layout mirrors the pipeline’s four broad concerns — deduplication, rejection, content categorization, and quality ranking — making it straightforward to review, archive, or delete each group independently. Images that pass all stages without matching any category stay exactly where they are in the source directory.
Output Directory Tree
categories/wallpapers/ is never created. Directories added in one run are not cleaned up between runs.
Routing Priority
MediaCleaner Pro routes each image to exactly one destination. All 10 stages run for every image, and after they complete the routing logic scans the results in order from 1 to 10, selecting the first stage whose condition was met.Rejection Stages (1–8)
Stages 1–8 can reject an image. All 10 stages still run for every image; after they complete, the routing logic picks the first stage whose condition was satisfied and moves the file to that stage’s subdirectory.
Classification & Ranking (9–10)
Stages 9 and 10 never reject. Stage 9 (AI Classification) is used as the routing fallback when no rejection stage fired. Stage 10 (Quality Ranking) always records a score; its
quality/ directory is used only when neither a rejection stage nor Stage 9 has claimed the file.run_streaming_pipeline implements this directly:
| Stage | Condition met? | Action |
|---|---|---|
| 1 – Exact Duplicate | No | Continues |
| 2 – Perceptual Duplicate | No | Continues |
| 3 – Tiny Image | No | Continues |
| 4 – Icon Detection | Yes (120×120, square) | → categories/icons/ — routing stops |
Files That Stay in the Source Directory
Unique images that pass all rejection stages (1–8) and receive no AI classification (Stage 9 is disabled or yields no match) are left in place. MediaCleaner Pro does not move files to a “keep” folder — the absence of a move is the signal that an image was considered unique and unclassified. This avoids needlessly copying high-value originals and makes it safe to run the pipeline on a live library.Configuring the Output Root with DEST_DIR
All output subdirectories are rooted under the path set in the DEST_DIR environment variable. Edit .env in the same directory as the binary to change it:
| Variable | Default | Description |
|---|---|---|
DEST_DIR | ./data/output | Root directory for all organized output subdirectories |
DEST_DIR can be an absolute path or a path relative to the binary’s working directory. The directory is created automatically on first run if it does not exist. You can point DEST_DIR at a separate drive or network share — just be aware of the note below regarding atomic moves.
File moves are performed as a rename operation, which is atomic when the source and destination are on the same filesystem. If
SOURCE_DIR and DEST_DIR are on different drives or volumes, the runtime falls back to a copy-then-delete sequence, which is not atomic. To preserve atomicity and maximize throughput, keep both directories on the same physical or logical volume.Reviewing Results After a Run
After processing completes, the output tree gives you a clear picture of what was found:duplicates/— safe to delete after spot-checking; both exact and perceptual duplicates are grouped for easy review.rejected/tiny/— contains images below your configured minimum dimensions. Review before deleting if you useMIN_WIDTH/MIN_HEIGHTvalues higher than the defaults.categories/— contains images that were not duplicates or rejects but were identified as a specific type (icon, thumbnail, screenshot, wallpaper, document, or AI-classified content).quality/— populated only when an image passes all rejection stages (1–8) and Stage 9 assigns no category. In practice, Stage 9 classifies every image, so these directories appear only in edge cases whereclassify_imagereturns no matching categories.