Skip to main content

Non-Redundant Media File Copy Tool: resumable, auditable, cross-platform, CLI-based.

Project description

Non-Redundant Media File Copy Tool

Safely copy media files (photos, videos) from a source HDD pool to a destination HDD pool, ensuring no redundant (duplicate) files at the destination. The tool is robust, resumable, and fully auditable, using an SQLite database for all state and supporting both fixed and removable drives.


Features

  • Block-wise (4KB) file copying and SHA-256 checksums
  • No file is copied if its checksum already exists in the destination
  • All state, logs, and planning files are stored in a dedicated job directory
  • Fully resumable and idempotent: safely interrupt and resume at any time
  • CLI commands for all phases: init, analyze, import-checksums, checksum, copy, resume, status, log
  • Cross-platform: Windows & Linux
  • Full test suite for all features and workflows

Quick Start

1. Install Requirements

pip install -r requirements.txt

2. Initialize a Job Directory

python -m src.main init --job-dir .copy-task

3. Analyze Source and Destination Volumes

python -m src.main analyze --job-dir .copy-task --src <SRC_ROOT> --dst <DST_ROOT>

4. Compute Checksums

python -m src.main checksum --job-dir .copy-task --table source_files
python -m src.main checksum --job-dir .copy-task --table destination_files

5. Copy Non-Redundant Files

python -m src.main copy --job-dir .copy-task --src <SRC_ROOT> --dst <DST_ROOT>

6. Resume, Status, and Logs

python -m src.main resume --job-dir .copy-task --src <SRC_ROOT> --dst <DST_ROOT>
python -m src.main status --job-dir .copy-task
python -m src.main log --job-dir .copy-task

7. Import Checksums from Old Database (Optional)

python -m src.main import-checksums --job-dir .copy-task --old-db <OLD_DB_PATH> --table source_files

CLI Commands

  • init — Create and initialize a job directory
  • analyze — Scan source/destination and update the database
  • import-checksums — Import checksums from an old SQLite database
  • checksum — Compute missing/stale checksums
  • copy — Copy only non-duplicate files
  • resume — Resume incomplete/failed operations
  • status — Show job progress and statistics
  • log — Output a log or audit trail

Testing

Run all tests (Windows PowerShell):

./scripts/test.ps1

Or (Linux/macOS):

./scripts/test.sh

Project Structure

  • src/ — Main source code
  • tests/ — Automated tests (pytest)
  • agents/ — Agent planning, memory, and reasoning
  • changes/ — Execution logs and persistent state
  • scripts/ — Automation scripts for testing, linting, formatting, and archival
  • Taskfile.yml — Cross-platform automation tasks

Requirements & Design

See requirements.md and AGENTS.md for full requirements, design, and agent workflow protocols.


License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

file_copy_tool-0.1.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

file_copy_tool-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file file_copy_tool-0.1.0.tar.gz.

File metadata

  • Download URL: file_copy_tool-0.1.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for file_copy_tool-0.1.0.tar.gz
Algorithm Hash digest
SHA256 618c172410d34f7ef7fd75a0082462dca5cccbc02343e240a92103450d270282
MD5 512187cd24d761ad5756659be38702d1
BLAKE2b-256 d8f74ca0ce1ee38429b3e3c256e5e54c25415ad5dd8a72ebee790947a3a122db

See more details on using hashes here.

File details

Details for the file file_copy_tool-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: file_copy_tool-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for file_copy_tool-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a4607173d5ffd78cc8d52f3bf02474a36f28fc39ae483a1b7f9c7801c28c0b87
MD5 a451f875bd53774dc063fa1cb155bd32
BLAKE2b-256 e80f8a3d3eed7d7593c51330e10c54c3f30dc73b41a54f8ff00fefcdc82b1abc

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page