/py-renamer

A Python module to easily rename your files in order (1, 2, 3, 4, 5...)

Primary LanguagePythonMIT LicenseMIT

PyRenamer

Easily rename your files and folders in order

Have you ever needed to rename dozens of files just to get them to look like this... ?

Now you don't have to do that anymore! 🎉

Installation

pip install pyrenamer

or

python -m pip install pyrenamer

Usage example

from pyrenamer import order

order()

A window will pop up and ask for a directory where the things to be renamed are located. Without specifying anything inside the order() function, it will rename only files (not folders), starting from 1.

This is the final result:

You can also:

  • Ignore files/folders that start with some character/word: assign that value to ignore (e.g. ignore='Do not')
  • Rename folders along with files: rename_folders=True
  • Count files and folders separately: independent=True
  • Change the initial count value: set ito a different value
  • Do the renaming in non-alphabetical order: reverse=True

Using some of the above:

from pyrenamer import order

order(ignore='Do not', rename_folders=True, independent=True, i=2, reverse=False)

Result:

More information is commented inside the code!

Release History

  • 1.0
    • Work in progress

Meta

Lucas Barzan – @lucasbarzandlucasbarzand@gmail.com

Distributed under the MIT license. See LICENSE for more information.

https://github.com/lucasbarzan

Contributing

  1. Fork it
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request