Skip to content

nagracks/py_rename

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Python Rename

Python file rename script

Usage

usage: py_rename.py [-h] [-v] [-A string] [-B string] [-r string] [-n]
                    [--lower] [--remove-space] [--camel-case] [-s]
                    filename

Python Rename

positional arguments:
  filename              filename

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         show program's version number and exit
  -A string, --prefix string
                        prefix filename with prefix string
  -B string, --postfix string
                        postfix filename with postfix string
  -r string, --rename string
                        replace filename with string
  -n, --dryrun          perform a dry run (will not run any actions)
  --lower               lowercase the filename
  --remove-space        remove space with underscore
  --camel-case          convert to camel case
  -s, --silent          silence output

$ py_rename.py -A vacation-photo- IMG*.jpg

TODO

Python Rename is a work in progress, so any ideas and patches are appreciated.

  • Prefix filename with prefix string
  • Postfix filename with postfix string
  • Convert to lower case
  • Convert to naming conventions CamelCase underscore_case (need work, not perfect yet)
  • Make arguments work properly
  • Implement regular expressions
  • Recursively walk directories and bulk-rename files

Contributing

Feel free to improve Python Rename. All kind of pull-requests are welcome.

Contributors

LICENSE

Python Rename is licensed under MIT