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 🙂

Marco


Source: bash

Leave a Reply