Author Topic: Rename files removing left characters up to and including underscore  (Read 3493 times)

Offline dougstroud

  • Newcomer
  • *
  • Posts: 37
    • View Profile
I need help in renaming a batch of files, removing the numerical sequence leading up to and including the "_" the first underscore in the filename.
Two examples are:
071_1_Candace_Mormon_2017_Prom__DSC0046_Web-Res  |new file name is| 1_Candace_Mormon_2017_Prom__DSC0046_Web-Res


003_Tami_Mormon_2017_Prom_DSC_0003_Web-Res  |new file name is| Tami_Mormon_2017_Prom_DSC_0003_Web-Res

Thank you

Doug
« Last Edit: May 17, 2017, 06:20:55 PM by dougstroud »

Offline dougstroud

  • Newcomer
  • *
  • Posts: 37
    • View Profile
After searching the forum and experimenting some w/ the renaming function I was able to cobble this together: {filenamebase: 4,50}. It is not perfect. I could not find a way to either find a text string or a variable that would identify the length of the string and exactly specify how long, however; I counted my longest string and used "50" which was a number larger than the longest string without adding spaces at the end and properly renamed my filenames.

Offline Kirk Baker

  • Senior Software Engineer
  • Camera Bits Staff
  • Superhero Member
  • *****
  • Posts: 25020
    • View Profile
    • Camera Bits, Inc.
Doug,

http://wiki.camerabits.com/en/index.php/User_Manual_Flat_View#Variable_Substring_Extraction

Basically, {filenamebase:4} should do what you want.

HTH,

-Kirk

Offline dougstroud

  • Newcomer
  • *
  • Posts: 37
    • View Profile
Thanks Kirk!