File renaming numbers

1.17.2 on opensuse leap 15.4

I try to rename files with “meaningful” names.

from sritch1234.cr2 to: streets-vancouver-20221215-1234.cr2

How can I extract the 1234 (the substring, 4,4) from the existing filename? I don’t want to lose it.

Thanks

Not something you can do with ART, sorry. The quickest would be a script if you are familiar with a scripting language like Python, Perl, or even Bash or some other shell dialect. Alternatively, you might take a look at digiKam, IIRC they have quite powerful renaming options.

HTH

I batch rename the raws with xnviewmp.
There are templates that you can set. For exemple, in my renaming scheme, I include the exif:date taken at the beginning, the general subject of the photos and the photo number at the end. As I merge photo frm different people, i also include the initials of photographer. Digikam can do that, but it is too complex for me.
exemple

FYI, I’ve just added a pattern to extract the numeric suffix from filenames, so this will be possible in the next version:

7 Likes

Hello, gThumb has a nice renaming tool that can do your job.
Just edit the Rename template as follows:

dump_360

1 Like

Fantastic! Excellent! :smiley:

Thank you

1 Like

Just a thought…it sounds like you might be aiming for a consistent naming pattern for all your image files (which is good!). Doing the rename in ART will work, and Alberto’s new change will allow it to use the exact renaming pattern you indicated that you want. But I think the ideal would be to do the rename right when you upload your image files. That way, the ones you don’t bring into ART will also follow the same naming convention; for example, if you upload a .jpg and go directly to Gimp with it.

I use RPD for this, but you could probably also do it with Exiftool or exiv2.

That will not work for me. I don’t know the new name of the files until I see them. For example, yesterday I had:

  • granville-island-221206-1234.cr2 to 1299.cr2
  • cyclists-vancouver-22120x-1305.cr2 to 1364.cr2
  • dodoite-221214-1365.cr2 to 1400.cr2

I only know what the names will be by looking and spending time with the thumbnails.

BTW, I did try RPD. It was far more complicated than what I tried to do. My operations are simple:

  • copy from the card to the ~/temp/intake directory
  • look at the images in the intake directory.
  • delete what is c**p
  • rename the images to the “proper names”
  • copy to the intake directory to the external drive that stores all the images (I have 3 external copies).
1 Like

:+1: That’s why it’s great that we have so many tools to choose from. There’s something to handle almost anyone’s preferred workflow.

1 Like