Skip to main content

A lightweight, powerful batch renaming and filesystem organizing CLI tool.

Project description

Reny

A lightweight, fast, and safe batch renaming and filesystem organization tool.

Background

reny was originally created as the renamer component inside the larger batchmp (Batch Media Processing) suite. It was spun off into its own standalone package to provide for an ultra-lightweight, safe, pure-filesystem organizing tool without FFmpeg / Mutagen media dependencies.

If you need advanced media operations (like denoising, cover-art extraction, or format transcoding), check out the original batchmp project. If you just need to safely organize your files with surgical precision, reny is all you need.

Installation

You can install reny globally using pipx:

pipx install .

Features

  • Virtual Views: Preview how a directory structure would look when reorganised by type, size, or date without moving or changing anything
  • Indexing: Multi-level indexing across nested directories, supporting multiple indexing schemes
  • Padding: Automatically pad existing numbers in filenames with leading zeros to fix sorting orders
  • Flattening: Safely collapse nested directory structures into a single folder
  • Regex Replacement: Powerful batch renaming using standard regular expressions
  • Dry-Run by Default: reny will always visualize targeted changes and ask for confirmation before it ever touches your files

Examples

Basic Operations

Print current directory structure:

reny

(Without arguments, reny defaults to the print command)

Add a sequential index to all .txt files recursively:

reny -r -in '*.txt' index

Pad existing numbers with leading zeros (e.g., 2 kms.png becomes 02 kms.png):

reny pad -md 2

Regex Replace: Change spaces to underscores in all filenames:

reny replace -fs ' ' -rs '_'

Advanced Operations & Virtual Views

Flattening nested directories: Collapse all sub-directories and bring their files up to the current folder level:

reny flatten

Organize by File Type: Move files into sub-directories grouped by their file extension (e.g., png/, pdf/):

reny organize -b type

Virtual Views (Dry-Run Preview): Preview how files would look if organized by year and month, without actually moving any files on your drive:

reny print -b date --date-format "%Y/%m"
Virtual view by date:
~/Downloads
  |- 2025/
    |- 01/
      |- document.pdf
    |- 02/
      |- image.png

Documentation & Tutorials

Although reny is a standalone project, its core organizing logic is inherited directly from batchmp. You can find detailed tutorials and deep-dives on how to master its capabilities in the original blog posts:

Usage

Run reny --help to see all available filesystem operations!

Development

To set up the project for development:

  1. Clone the repository and navigate into it:
    git clone https://github.com/akpw/reny.git
    cd reny
    
  2. Create and activate a virtual environment:
    python3 -m venv .venv
    source .venv/bin/activate
    
  3. Install the project in editable mode along with testing dependencies:
    pip install -e ".[test]"
    

Running Tests

The project uses pytest for its test suite. Because reny performs real filesystem operations, the tests are designed to dynamically create and clean up safe temporary sandbox folders during execution.

To run the full test suite:

pytest -v --tb=short tests/

To run a specific test file:

pytest tests/fs/test_fs_organize.py

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

reny-1.0.0.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

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

reny-1.0.0-py3-none-any.whl (58.9 kB view details)

Uploaded Python 3

File details

Details for the file reny-1.0.0.tar.gz.

File metadata

  • Download URL: reny-1.0.0.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for reny-1.0.0.tar.gz
Algorithm Hash digest
SHA256 60346291adb50a078332a8c72a1d4106d2b328d526781e75c6aefab14584af3f
MD5 21d5a14d1b2a0c531d799a4c9758f1ab
BLAKE2b-256 f0c7b7e7af9b9ec2778b2839955d11741054d47542454d7bf418d084c92a1a51

See more details on using hashes here.

File details

Details for the file reny-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: reny-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 58.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.6

File hashes

Hashes for reny-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ccb20db00cf5070612959b27f0fb0314981ca4c09c4fd141b7a6b27b6afc87d6
MD5 77ee41f53f8c4e3c364fdca46f2ed714
BLAKE2b-256 8e1f7da828439dee91a92c0e1e800f507349b1be64b01d9c3288b957fdbc0073

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