Renaming in Python

I needed to rename several files.  I thought perhaps using a script would make it a little faster.  Well, the renaming went faster.  Writing the script of course took much longer.  But I suppose I learned something.

The image files were individual pages from a book of about 64 pages.  They were named one number off from their actual page numbers.  You can imagine how annoying that can be.  You can’t?  Well, try harder.  It’s pretty annoying when 3 isn’t three but 4.  Three isn’t four!

That doesn’t irritate you?  Well, I wrote a script to fix it nonetheless.

You can find the script over at my GitHub.

It’s modifiable enough so perhaps it can suit your needs.  Feedback is always welcome.

Share

Leave a Reply

Your email address will not be published. Required fields are marked *