Recursively filename change, number shifting

I am writing as I have found in here many solutions to recursively change the filenames in Linux, but not exactly the one that matches my case.
I have a bunch of files in one directory called:

  • FileName_01.pdf
  • …..
  • FileName_20.pdf

and I want to recursively change their names so that:

  • FileName_01.pdf -> FileName_15.pdf
  • FileName_02.pdf -> FileName_16.pdf
  • ….
  • FileName_20.pdf -> FileName_35.pdf

Thanks for your help 🙂


Source: bash

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.