FolderTrace
FolderTrace is a local-first application for scanning folders and building a structured, persistent inventory of their contents.
Point FolderTrace at a directory. It creates a persistent inventory of the files, detects exact duplicates, and tells you what changed between scans.
It helps answer practical questions about large file collections:
- What files are in this folder?
- Which files are exact duplicates?
- What is stored inside my archives?
- What has changed since a previous scan?
- Can I recreate or verify this collection later?
FolderTrace is designed for general-purpose collections such as downloads, project archives, photo backups, and datasets. Mod folders are a useful example, but not the product's primary focus.
Install
FolderTrace requires Python 3.11 or later.
From PyPI (recommended)
pipx install foldertrace
After installation:
foldertrace --help
foldertrace scan ~/Downloads
foldertrace summary
Latest development version
Install directly from GitHub if you want unreleased changes:
pipx install git+https://github.com/LucasPullinger/FolderTrace.git
Run from source
To run FolderTrace from a local clone:
git clone https://github.com/LucasPullinger/FolderTrace.git
cd FolderTrace
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[test]"
pytest
How it works
FolderTrace recursively scans a selected directory, collects metadata for every file, calculates SHA-256 hashes, optionally inspects supported archives, and stores the resulting manifest locally. It then analyses that manifest to surface duplicates and changes over time.
Select folder
↓
Scan files and collect metadata
↓
Calculate SHA-256 hashes
↓
Inspect supported archives
↓
Store manifest locally
↓
Analyse duplicates and changes
A file record may contain information like this:
{
"path": "/Users/lucas/Downloads/project-final.zip",
"name": "project-final.zip",
"size": 34829102,
"sha256": "a893...",
"modified_at": "2026-09-03T10:24:00+01:00",
"archive": {
"type": "zip",
"file_count": 142
}
}
Features
The first release provides a small, reliable auditing workflow:
- Recursively scan a folder and record each file's path, name, extension, size, and modification date.
- Calculate SHA-256 hashes.
- Detect and report exact duplicate files.
- Recognise and inspect
.zip,.tar, and.tar.gzarchives without extracting them. - Persist scan manifests locally in SQLite.
- Compare a new scan with an earlier one to report added, removed, changed, and unchanged files.
- Identify possible filename-based version groups.
- Export saved scans as JSON or CSV.
- Reuse hashes from unchanged files to speed up repeated scans.
- Exclude unwanted files with glob patterns or a
.foldertraceignorefile. - Summarise file counts and total size by extension.
Archive records can include the number of contained files, total uncompressed size, and contained extensions.
Exact duplicates vs. possible versions
FolderTrace keeps these concepts deliberately separate.
| Finding | Meaning | Confidence |
|---|---|---|
| Exact duplicate | Files have the same SHA-256 hash. | Definitive |
| Possible version group | Filenames suggest related releases, such as tool-v1.0.zip and tool-v2.0.zip. |
Interpretive |
Version grouping is intentionally conservative: a group is only shown when at least one filename contains a version number or date marker. It must never be presented as equivalent to hash-based duplicate detection.
Command-line interface
The application is a CLI:
foldertrace scan ~/Downloads
foldertrace summary
foldertrace scans
foldertrace duplicates
foldertrace archives
foldertrace types
foldertrace versions
foldertrace changes --from 1 --to 2
foldertrace export manifest.json
foldertrace cleanup --keep-latest 3 --yes
Each scan is stored in SQLite at ~/.local/share/foldertrace/foldertrace.db by default. Use foldertrace --help for the complete command reference.
Exclude paths from a scan with repeated glob patterns:
foldertrace scan ~/Downloads --exclude "*.tmp" --exclude ".DS_Store"
You can also create a .foldertraceignore file in the scanned folder:
*.tmp
.DS_Store
.venv/*
node_modules/*
Repeated scans reuse SHA-256 hashes for files whose path, size, and modification time are unchanged. FolderTrace displays progress and reports reused versus newly calculated hashes.
Remove saved scans
cleanup removes scan records from FolderTrace's local database only; it never deletes files from the scanned folder. The --yes confirmation flag is required.
# Delete one saved scan.
foldertrace cleanup --scan-id 1 --yes
# Keep the latest three scans and delete older saved scans.
foldertrace cleanup --keep-latest 3 --yes
# Delete every saved scan from FolderTrace's database.
foldertrace cleanall --yes
An example comparison:
Scan changes: 1 → 2
Added: 12
Removed: 4
Changed: 7
Unchanged: 261
Technology
- Python 3.11+ — application language and standard-library support for filesystem scanning.
- Typer — command-line interface and argument validation.
- Rich — readable terminal tables and scan summaries.
- SQLite — local, serverless storage for persistent scan manifests.
- SQLAlchemy — Python database models and schema creation for the scans and files tables.
- pytest — automated scanner, CLI, hashing, and database tests.
hashlib provides SHA-256 hashing, while zipfile and tarfile inspect supported archives. FolderTrace runs entirely locally and does not require cloud services.
Roadmap
- Add optional GUI support.
- Add specialised plugins, such as a Nexus Mods integration.
- Expand archive-format support, including
.7zand.rar. - Improve scan filtering and reporting.
Non-goals
FolderTrace is not a file manager, backup program, antivirus product, cloud storage system, archive replacement, or mod manager. It analyses and records a collection so that it can be understood, verified, and compared over time.
License
FolderTrace is licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file foldertrace-0.1.4.tar.gz.
File metadata
- Download URL: foldertrace-0.1.4.tar.gz
- Upload date:
- Size: 30.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a22fb9b1a0a94871bd853e0ec6e834b76182ac81e933c8daafdec9eb11708afc
|
|
| MD5 |
0957705780923be521a2f1f48ff1f178
|
|
| BLAKE2b-256 |
fbea4ab4185f42f0e3c4ed6d8ff01a24b433e4f54562b12e264e16c899bb4bbb
|
Provenance
The following attestation bundles were made for foldertrace-0.1.4.tar.gz:
Publisher:
release.yml on LucasPullinger/FolderTrace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foldertrace-0.1.4.tar.gz -
Subject digest:
a22fb9b1a0a94871bd853e0ec6e834b76182ac81e933c8daafdec9eb11708afc - Sigstore transparency entry: 2701144483
- Sigstore integration time:
-
Permalink:
LucasPullinger/FolderTrace@72ba43df4b0a2e5d2f940760c68e7c436452148d -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/LucasPullinger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@72ba43df4b0a2e5d2f940760c68e7c436452148d -
Trigger Event:
push
-
Statement type:
File details
Details for the file foldertrace-0.1.4-py3-none-any.whl.
File metadata
- Download URL: foldertrace-0.1.4-py3-none-any.whl
- Upload date:
- Size: 28.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6ab088c89b901643dad7df978a7aad06d0c7746efeae54657f2422c9a77945c
|
|
| MD5 |
3654473aa9d04cdcfd6581a2d707a2bd
|
|
| BLAKE2b-256 |
5175f81c9d7e138f295490e2a9288ee8a1f9594484d8faa02f084f53987be270
|
Provenance
The following attestation bundles were made for foldertrace-0.1.4-py3-none-any.whl:
Publisher:
release.yml on LucasPullinger/FolderTrace
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
foldertrace-0.1.4-py3-none-any.whl -
Subject digest:
e6ab088c89b901643dad7df978a7aad06d0c7746efeae54657f2422c9a77945c - Sigstore transparency entry: 2701144487
- Sigstore integration time:
-
Permalink:
LucasPullinger/FolderTrace@72ba43df4b0a2e5d2f940760c68e7c436452148d -
Branch / Tag:
refs/tags/v0.1.4 - Owner: https://github.com/LucasPullinger
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@72ba43df4b0a2e5d2f940760c68e7c436452148d -
Trigger Event:
push
-
Statement type: