Skip to main content

A fast, flexible file sorter and organizer

Project description

📁 File swirl

Now Organizes files from chaos to order with just one command. Organize photos, videos, documents, and more — cleanly and efficiently — using flexible sorting rules.

✨ Organize Features

  • 📅 Sort by Date — Organize files into folders by creation or modified date.
  • 🧩 Filter by File Extension — Group files like .jpg, .mp4, .pdf, etc
  • 🏷️ Sort by Camera Make (EXIF.make) — Useful for photographers to group by device brand.
  • 🔍 Sort by File Type (MIME) — Organize images, videos, documents, etc.
  • 🗂️ Nested Sorting — Apply multi-level sort: e.g., Date → Extension → Make.
  • ⚙️ Custom Sort Key Chains — Chain any supported keys in any order.
  • 🎛️ Parallel Processing Support — Fast sorting using multi-threading.

Also supports to arranges file in nested folder structure like Output/Data/Make/Model for all the options mentioned above.

This scripts lets you filter out specific file extensions while sorting. e.g Sort only .mp4 files from source dir into destination dir

System requriments.

  • Python3.10+
  • ExifTool

✅ Supports

  • Windows 11 x64

Project setup

- git clone https://github.com/NishantGhanate/FileSwirl.git
- cd FileSort
- python -m venv venv
- [Win] > venv\Scripts\activate
- [Linux] $ venv/bin/activate
- pip install -r requriments.txt

Download this tool

- Download & Install: https://exiftool.org/
- For Windows Installer: https://oliverbetz.de/pages/Artikel/ExifTool-for-Windows

To install project locally

For development
> pip install -e .

For final build testing
> python -m pip install .

To build project locally

> python -m build
> pip install dist/file_swirl-0.0.10-py3-none-any.whl

HELP

> python -m file_swirl.cli -h

Run cli: default command

> python -m file_swirl.cli --input_paths "E:\\src" --output_path "E:\\dest"

Defaults Args for cli

--shift_type copy
--nested_order date
--process_type linear
--file_extensions "{pre-defined inside constants}"

Args and its values

--shift_type : copy | move
--nested_order : alphabet date file_extension file_extension_group make model
--process_type : linear | parallel
--file_extensions "{pre-defined inside constants all basic formats}"

Examples:

🔁 Move files from a source to a destination

python -m file_swirl.cli \
  --input_paths "E:\\src" \
  --output_path "E:\\dest" \
  --shift_type "move"

🗃️ Move files and organize by nested folders: date file_extension

python -m file_swirl.cli \
  --input_paths "E:\\src" \
  --output_path "E:\\dest" \
  --shift_type "move" \
  --nested_order date file_extension

🏷️ Organize files by camera make/brand

python -m file_swirl.cli \
  --input_paths "E:\\src" \
  --output_path "E:\\dest" \
  --nested_order make

⚡ Copy from multiple folders in parallel mode

python -m file_swirl.cli \
  --input_paths "E:\\src" "E:\\temp" \
  --output_path "E:\\dest" \
  --shift_type "copy" \
  --process_type "parallel

🧱 Architecture:

Currently its limited to 1 producer and 4 q each thread will consume from this q

+-----------------+       +------------------+
|   Producer(s)   | --->  |  Queue (Stream)  | ---> [Processor 1]
| (dir scanners)  |       |  file paths      | ---> [Processor 2]
+-----------------+       +------------------+ ---> [Processor N]

Set to test code locally

Linux : export PYTHONPATH=.
WIN: set PYTHONPATH=.

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_swirl-0.0.11.tar.gz (16.5 kB view details)

Uploaded Source

Built Distribution

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

file_swirl-0.0.11-py3-none-any.whl (19.0 kB view details)

Uploaded Python 3

File details

Details for the file file_swirl-0.0.11.tar.gz.

File metadata

  • Download URL: file_swirl-0.0.11.tar.gz
  • Upload date:
  • Size: 16.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for file_swirl-0.0.11.tar.gz
Algorithm Hash digest
SHA256 25aa49e63a82076b8b021d2a2b9499f6735797949c0f9922ad3b9e612154945c
MD5 838baeb36a6b16c9165ef85148897d01
BLAKE2b-256 e91eb6a7d9162dda9c93833480c30f58a0662bfc4fb6587b4241d8e072015c1c

See more details on using hashes here.

File details

Details for the file file_swirl-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: file_swirl-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 19.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.18

File hashes

Hashes for file_swirl-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 ce22e705469c1c0ae60072d6855cd311abbdf79e5a370c4359a167b07f6a75b4
MD5 009e44cd77f31fa0a313411363b47411
BLAKE2b-256 9e6cb0580c531aabf430de6882ca7ed9b8367e885fa95f2c79e729a5c9e5fe1a

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