A simple tool to check file integrity using CRC32 hash in filename
Project description
crctools - A simple tool to check file integrity using CRC32 hash in filename
Having the hash of files in their name makes it so much easier to:
- keep track of their integrity
- deduplicate files
- probably more
This is intended to be a simple to use command-line utility to:
- add CRC32 hash into filename in a widely recognised format (suffix with 8 hex uppercase characters in square brackets)
- verify integrity of files based on hash in file name
- update hash in name
Requirements
This project was developed for Python 3.10 and may not work on lower versions.
Installation
From a terminal execute:
python -m pip install crctools-DavidRodriguezSoaresCUI
On some systems it may be necessary to specify python version as python3
Usage
$> python -m crctools --help
usage: __main__.py [-h] [--skip_verify] [--overwrite] [--recursive] [--extensions [EXTENSIONS ...]]
[--min_size MIN_SIZE] [--debug]
PATH
positional arguments:
PATH Can be file path or directory (all files in directory will be processed)
options:
-h, --help show this help message and exit
--skip_verify Skip verification; only process files with no hash in filename
--overwrite Overwrite CRC in filename when verification fails
--recursive (Only with PATH a directory) Enables recursive search for files to verify
--extensions [EXTENSIONS ...]
Restrict files to process with extension whitelist (default: no restriction;
you may list extensions with leading dot separator)
--min_size MIN_SIZE Restrict files to ones of at least <min_size> bytes (default: 0)
--debug Debug mode (undocumented on purpose)
Example: Check large (>10MB) video files in directory D:\Videos
(and subdirectories) :
python -m crctools "D:\Vidéos" --recursive --extensions mkv mp4 --min_size 10000000
Note: these are all equivalent:
--extensions mkv mp4
--extensions .mkv .mp4
--extensions MKV MP4
--extensions .MKV .MP4
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
Built Distribution
Close
Hashes for crctools-DavidRodriguezSoaresCUI-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9b6b7ee34dad239fc23e445a67363c4e773e2e35eaae2257790a9f36cb46dbf |
|
MD5 | 4fdc782fb8693429ec51687a99601b66 |
|
BLAKE2b-256 | 5728ce345450fd47759c4c5a80232dafedb141d65cc8f1be407754153d4728ad |
Close
Hashes for crctools_DavidRodriguezSoaresCUI-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07f394853599e8ecf45527939c15b22a39a894b8b77e5f162ab6d08e5fff46a2 |
|
MD5 | b97d9b0c83cfd007a50fbb7b18329c72 |
|
BLAKE2b-256 | d5be6da13a606ec70f29b34ee99ffb993885d0b859a7f3d3899111d11770baf1 |