Downloads Sorter
🗂️ A powerful Python tool to automatically organize your downloads folder.
Features
- 📂 Automatically sorts files into folders based on file type
- 🧠 Intelligently categorizes files based on content patterns
- 📊 Provides statistics about your download organization
- 🔄 Can be set up to run automatically
- 🧹 Clean up your downloads folder with a single command
Installation
pip install downloads-sorter
Usage
Basic Usage
Simply run the command to organize your downloads folder:
downloads-sorter
Options
--dry-run: Show what would be done without actually moving files--stats: Show statistics about your downloads folder organization--directory PATH: Specify a custom downloads directory--verbose: Show detailed logging--setup: Set up automatic sorting with cron (Linux/macOS)--version: Show the version number
Examples
# Sort downloads with a dry run (no actual changes)
downloads-sorter --dry-run
# View organization statistics
downloads-sorter --stats
# Sort files in a custom directory
downloads-sorter --directory /path/to/directory
# Set up automatic hourly sorting
downloads-sorter --setup
Folder Structure
Downloads Sorter organizes files into the following folder structure:
_pdf: PDF documents_docx: Word documents_xlsx: Excel spreadsheets_csv: CSV data files_png,_jpeg,_svg: Images_receipts: Invoices and receipts_contracts: Legal documents and contracts_meetings: Meeting notes and calendar invites_applications: Software installers_projects: Project-related files_misc: Miscellaneous files
Using as a Library
You can also use Downloads Sorter as a Python library in your own scripts:
from downloads_sorter import sort_downloads, get_stats
# Sort downloads
result = sort_downloads()
print(f"Organized {result['moved']} files")
# Get statistics
stats = get_stats()
print(f"Total files: {stats['total_files']}")
print(f"Organized files: {stats['organized_files']}")
Customizing
You can customize the sorting rules by creating your own script using the library:
from downloads_sorter import sort_downloads
from downloads_sorter.sorter import FILE_TYPES, SPECIAL_PATTERNS
# Add custom extensions
FILE_TYPES['.custom'] = '_custom_folder'
# Add custom patterns
SPECIAL_PATTERNS[('mypattern', 'pattern2')] = '_pattern_folder'
# Run with custom rules
sort_downloads()
Contributing
Contributions are welcome! Feel free to open issues or pull requests.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for downloads-sorter 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| downloads_sorter-0.3.0.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| downloads_sorter-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.7 kB
Release files / downloads_sorter-0.3.0.tar.gz
| Download URL | downloads_sorter-0.3.0.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e5de859a48c843530bf6a71b85773fe1adcfa4cce4c7c7eb539fe91a5eb59a7
|
|
BLAKE2b-256 checksum How to use checksums |
49e7570c28b86023e9265ecbd409f44a7a029929862206b3f63e7489f83c1714
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.
Transparency logRelease files / downloads_sorter-0.3.0-py3-none-any.whl
| Download URL | downloads_sorter-0.3.0-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c0fabd4ccf2342754e368bbfafdcc6e474511d464ab23f187a2cc4a986b4f7ff
|
|
BLAKE2b-256 checksum How to use checksums |
6b464cfe68d18325aea62d182baf66acba41d5c9ab052f691491441dee53b4af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Apr 12, 2026.
Transparency log