Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Remove a prefix from a batch of files

Engaged ,
Oct 12, 2018 Oct 12, 2018

This task is so critical, I need to ask my specific question regarding it. For some reason I have a number of files with names that include the prefix "untitled-" and then the file number (eg. "untitled-1010550.RW2"). I want to remove "untitled-" from the file names.

3.7K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Oct 16, 2018 Oct 16, 2018

I don't understand why you ask for advice, and then are too afraid to use it when you get advice. Simply use 'File Number Suffix' as I suggested. As you can see from this screenshot that will work just fine, no matter how many numbers the file name has. And renaming files from within Lightroom does not screw up the database.

Lightroom.jpg

Translate
Community Expert ,
Oct 12, 2018 Oct 12, 2018

Where does the second part come from? If the second part has some logic in it, like a sequence number, then you could simply rename the images with just that sequence.

-- Johan W. Elzenga
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 12, 2018 Oct 12, 2018

the "sequence number" is the photo number assigned by the camera, but the batch of photos will not be in sequence with one another.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 12, 2018 Oct 12, 2018

mrdavie99  wrote

the "sequence number" is the photo number assigned by the camera, but the batch of photos will not be in sequence with one another.

Just an idea that should work (try it on a single image first): Use a rename template that only contains 'File Number Suffix'.

-- Johan W. Elzenga
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 12, 2018 Oct 12, 2018

I’ll give it a try. Thanks.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 12, 2018 Oct 12, 2018

Have you tried renaming back to the original filename - if it is available?

Screen Shot 2018-10-12 at 23.23.06.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2018 Oct 13, 2018

As these file names contain 7 numbers, I don’t suppose that these numbers are the original file name.

-- Johan W. Elzenga
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 13, 2018 Oct 13, 2018

Agreed, that's likely, but it is camera-dependent. If the OP has renamed the files in LR, the original filename would be available in the Metadata panel and would be available in renaming.

Alternatively, there is a solution using Bridge and its "string substitution" method - save metadata back to the files. I describe the method in this article which also shows how to do the same using my plugin Complex file renaming in Lightroom made simple(r) with Search and Replace.

Using Bridge:

SNAG-0005.jpg

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 16, 2018 Oct 16, 2018

In the original example, the original filename is "1010550.RW2". The Metadata does not appear to have a field representing the original filename, only the File Name. I see the example above of the Filename Template Editor, but I am not sure how to utilize it to remove the prefix "untitled-"?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2018 Oct 16, 2018

The original filename field only appears in the Metadata panel if the file was renamed in LR, and you'd need to switch to the EXIF and IPTC view, as here:

Screen Shot 2018-10-16 at 18.37.18.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 16, 2018 Oct 16, 2018

OKAY. So now, I just examined the backup folder for photos taken in 2016 and, for some reason, when I originally imported files the prefix "untitled-" was added to the file name. I am not sure why unless something was set in Lightroom before I imported from the camera.

I do not usually focus on file names. That is one reason for utilizing Lightroom - its database management feature. Nonetheless, I thought the files started off with one name (in the camera) and were magically renamed when imported into Lightroom. I must have inadvertently overlooked a setting prior to initiating the import procedure. I will live with these file names for fear I will mess up the database if I start to batch rename files. Finally, I do not want to manually rename several hundred file names. It is not that important.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2018 Oct 16, 2018

Then just follow my recommendation (above) about using Bridge. Or use LR's rename and forget about the 1010550 part of the name - use a sequential number.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Oct 16, 2018 Oct 16, 2018

I don't understand why you ask for advice, and then are too afraid to use it when you get advice. Simply use 'File Number Suffix' as I suggested. As you can see from this screenshot that will work just fine, no matter how many numbers the file name has. And renaming files from within Lightroom does not screw up the database.

Lightroom.jpg

-- Johan W. Elzenga
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Oct 16, 2018 Oct 16, 2018
LATEST

Thank you for being persistent Johan. I did it and it worked. AND it was easy!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines