File Organizer
A safe, general-purpose local file organizer and file-management CLI that categorizes your files securely and predictably.
Features
- Safe by Default: Never deletes files automatically. Never silently overwrites files.
- Dry-run Mode: See what would happen before actually moving anything.
- Duplicate Handling: Safely handles file collisions (
file (1).ext) and skips exact identical duplicates using MD5 hashing. - Configurable: Use sensible defaults or provide your own JSON configuration for custom categories.
- Recursive Mode: Explicitly opt-in to process subdirectories.
- Hidden/System Files: Safely ignores hidden files (starting with
.) and symlinks by default.
Prerequisites
- Python 3.12 or higher
Installation
You can install this tool using pipx (recommended) or pip:
# Recommended: Install isolated via pipx
pipx install git+https://github.com/techykaif/file_handling.git
# Alternatively, install via pip
pip install git+https://github.com/techykaif/file_handling.git
Usage
Organize a directory:
file-organizer ~/Downloads
Preview changes without moving files:
file-organizer ~/Downloads --dry-run
Organize a directory and its subdirectories:
file-organizer ~/Downloads --recursive
Use a custom configuration:
file-organizer ~/Downloads --config my_categories.json
Skip confirmation prompts (for automation):
file-organizer ~/Downloads --yes
Configuration
By default, files are organized into standard categories (Documents, Images, Videos, Audio, Archives, Code, etc.). You can override these by creating a custom JSON configuration file:
{
"Photos": [".jpg", ".png", ".heic"],
"Work": [".pdf", ".docx", ".xlsx"],
"Music": [".mp3", ".wav"]
}
And passing it via --config:
file-organizer ~/Downloads --config config.json
Safety
File manipulation is potentially destructive, which is why file-organizer implements strong safety defaults:
- Dry-run (
--dry-run): Shows planned changes. - No silent overwrites: Filename collisions in the destination are handled gracefully (
file (1).txt). - No automatic deletion: The tool will not delete any files or directories.
- No hidden/system file moves: Hidden files and symbolic links are ignored by default.
Development
Clone the repository and install it in development mode:
git clone https://github.com/techykaif/file_handling.git
cd file_handling
python -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
Run tests and linting:
pytest
ruff check .
License
This project is licensed under the MIT License - see the LICENSE file for 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
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 kaif_file_organizer-0.1.2.tar.gz.
File metadata
- Download URL: kaif_file_organizer-0.1.2.tar.gz
- Upload date:
- Size: 8.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a264dd2bd13099d501b6a6e9abfd775417796e1509b35ae423cf79d9d74f87c4
|
|
| MD5 |
510ae1bd2c10ce53a1af067070ad425e
|
|
| BLAKE2b-256 |
77112d43467d1d2580266f746111a5d5bd9615c6529feacc802c0729d87cffea
|
Provenance
The following attestation bundles were made for kaif_file_organizer-0.1.2.tar.gz:
Publisher:
release.yml on techykaif/file-organizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kaif_file_organizer-0.1.2.tar.gz -
Subject digest:
a264dd2bd13099d501b6a6e9abfd775417796e1509b35ae423cf79d9d74f87c4 - Sigstore transparency entry: 2407298078
- Sigstore integration time:
-
Permalink:
techykaif/file-organizer@e0f5df2402adebd49bfe11836e4171d1ec2a4112 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/techykaif
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0f5df2402adebd49bfe11836e4171d1ec2a4112 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kaif_file_organizer-0.1.2-py3-none-any.whl.
File metadata
- Download URL: kaif_file_organizer-0.1.2-py3-none-any.whl
- Upload date:
- Size: 8.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 |
d68f13011052d77c70143834159c62b104a2d4fe31ef995718deaba61d1cd835
|
|
| MD5 |
ffa8bc7c4813561c89d756c8ab5f07c9
|
|
| BLAKE2b-256 |
121a280ce8a774b639e00d860c4a00188e0d1420cbf3644b3b76e0e33fc9021e
|
Provenance
The following attestation bundles were made for kaif_file_organizer-0.1.2-py3-none-any.whl:
Publisher:
release.yml on techykaif/file-organizer
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kaif_file_organizer-0.1.2-py3-none-any.whl -
Subject digest:
d68f13011052d77c70143834159c62b104a2d4fe31ef995718deaba61d1cd835 - Sigstore transparency entry: 2407298195
- Sigstore integration time:
-
Permalink:
techykaif/file-organizer@e0f5df2402adebd49bfe11836e4171d1ec2a4112 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/techykaif
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@e0f5df2402adebd49bfe11836e4171d1ec2a4112 -
Trigger Event:
release
-
Statement type: