Skip to main content

padio

Zero pad numeric filenames

Turn a bunch of files like this:

file1.txt
file10.txt
file5.txt

and want them to be sorted like this:

file01.txt
file05.txt
file10.txt

you can run:

padio *.txt

Installation

pip install padio

Usage

usage: padio [-h] [-l LENGTH] [-f] [-v] [-d] [-i REGEX] [--ignore-files IGNOREFILE [IGNOREFILE ...]] file [file ...]

Pads numbers in file names so they consistently align and sort

positional arguments:
  file                  Files to be renamed

optional arguments:
  -h, --help            show this help message and exit
  -l LENGTH, --length LENGTH
                        Length of numbers after padding (default: auto)
  -f, --force           Force rename, even if file at destination exists
  -v, --verbose         Print all actions
  -d, --dry-run         Print actions only without modifying any file. Implies --verbose
  -i REGEX, --ignore REGEX
                        Regular expression used to ignore files matching the name
  --ignore-files IGNOREFILE [IGNOREFILE ...]
                        Files to ignore for renaming. Must add -- before positional arguments

Original repo

Originally hosted at https://git.iamthefij.com/iamthefij/padio.git

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

padio-1.0.1.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

padio-1.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file padio-1.0.1.tar.gz.

File metadata

  • Download URL: padio-1.0.1.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for padio-1.0.1.tar.gz
Algorithm Hash digest
SHA256 dd7681a9d0e2770c50fe6d1b0c72b335b751732d14f57a187758f8bc0deb8428
MD5 02ea670965f04b5079e760488094a5ea
BLAKE2b-256 067029cf49da9aaced7127c31f301286ae790b9e215779e477df95783174fe5e

See more details on using hashes here.

File details

Details for the file padio-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: padio-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for padio-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a7ae4737ebb1b9eba85a39119f2cfe92fb0d67668bfeccd7e77bc901cf374694
MD5 16706c7f080ef47aeac15d04e29366ba
BLAKE2b-256 64166afd8bd67bffe3d6d08647f3fb3f186468c80c01ad14f17c25258301840b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 files

1.0.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page