Author Topic: Photos renaming when Copying to new folder  (Read 1589 times)

Offline jennyspies4@gmail.com

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Photos renaming when Copying to new folder
« on: February 16, 2024, 04:11:20 AM »
I am running Photo Mechanic Plus Version 6.0, build 6890 (ffcbb4c) and Windows 11 Home version 22H2

How do I prevent the file extension (.CR2) from being included in the file name when I rename copied photos?

Many thanks

Jenny

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 971
    • View Profile
Re: Photos renaming when Copying to new folder
« Reply #1 on: February 16, 2024, 10:39:51 AM »
{filenamebase} should technically work, So it looks like your files have ".CR2" within the actual filename itself, followed by other characters, and then the actual extension.

As shown in your screenshot:

"2023-12-29_SA_Mabalingwe_L12A5586.CR2               .CR2" will become " 2023-12 29_SA_Mabalingwe_L12A5583.CR2_SELECT001.CR2"

Can you ZIP up one or two of these files and send it to us so I can work directly with one of the files and get you a solution? If it is too large to post as an attachment here, feel free to upload to a service like dropbox and then post a link. If you prefer to not to post the image publicly, you can send me a direct message or email it to support@camerabits.com

Offline jennyspies4@gmail.com

  • Newcomer
  • *
  • Posts: 10
    • View Profile
Re: Photos renaming when Copying to new folder
« Reply #2 on: February 19, 2024, 04:08:07 AM »
Hi

Thanks, I've forwarded Dropbox share link to support@camerabits.com.

Regards

Jenny

Offline ahoward

  • Camera Bits Staff
  • Hero Member
  • *****
  • Posts: 971
    • View Profile
Re: Photos renaming when Copying to new folder
« Reply #3 on: February 20, 2024, 11:55:31 AM »
For the file that you gave me, you can use the following:

{filenamebase:0,-13}

This will use the filenamebase variable, but stop at 13 characters from the end. The reason that you need to do this is because your file has a bunch of spaces before the real extension but after the fake extension. The variable above will leave off all of those spaces and the fake extension.

That said, since we don't know how the fake extension and spaces were added to the file, its entirely possible that your other files have a varying number of space characters after the fake extension, which will mean that variable that I've provided won't work for them and you might need to adjust -13 to some other number if there is a varying number of spaces.