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

Batch Rename Multiple Images Using Different File Names

Community Beginner ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Hi, 

 

I'm aware of using Bridge to batch rename Images but this relies on all images having the same image name but different sequence. e.g garden-1.jpeg Does anyone know how to batch rename a group of images but use individual filenames? e.g.

file 1 = 10682s-1.jpeg

file 2= 19336g-1.jpeg

file 3 =  4324r-1.jpeg

 

Thanks

Views

2.7K

Translate

Translate

Report

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
Adobe
Community Expert ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Sorry, I am unclear on what the current names are and what they should be? 

Votes

Translate

Translate

Report

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 Beginner ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Sorry should have I clarified. 

 

Currently, I have multiple files e.g

 

La Ponderso Malbec

La Ponderso Chardonnay

And I need them to be changed to their product code name then sequence and file name. e.g. 

La Ponderso Malbec change to 10682s-1.jpeg

La Ponderso Chardonnay change to 19336g-1.jpeg

 

And I was wondering if there is a way to do this in batch rename. 

 

Thanks

Votes

Translate

Translate

Report

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
LEGEND ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Where did you get the product code? Bridge has no way to know that information.

You could write a script to pull from a file, I suppose, but that might take as long as doing it manually.

Votes

Translate

Translate

Report

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 ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Ah, you posted pretty much the same as me but about a minute earlier … 

 

I wonder if the target names might be stored in the metadata? 

Other than that it’s really hard to imagine how to connect the original names and the intended names other than with a list. 

Votes

Translate

Translate

Report

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 Beginner ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Thanks! I'll try the metadata route. 

Votes

Translate

Translate

Report

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 Beginner ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Thanks 

 

All of the product codes are from a product file system. It's looking like a bit of a manual job. 

Votes

Translate

Translate

Report

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 ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

In whch form is the »product file system« available? 

Votes

Translate

Translate

Report

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 Beginner ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

It can be available in excel. We're currently migrating to a new system that requires all product images to be renamed with their product code-sequence-filetype for upload. 

Votes

Translate

Translate

Report

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 ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

With a list in Excel it should be possible to Script the renaming process, but I wonder if some ready-made-solutions may already exist. 

Have you asked on the Bridge Forum, too? 

And have you googled »rename files based on excel list«? 

Votes

Translate

Translate

Report

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 ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Bridge’s Batch Rename offers »String Substitution« but that does not seem to be sufficient for this. 

So as there seems to be no way to translate the current name to the target name without some form of list (of source names and target names) I suspect this might need to be Scripted. 

 

Votes

Translate

Translate

Report

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
LEGEND ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

My Utility Script Pack on Adobe Exchange is open source, you can look at the scripts to see how to (for example) open and read a text file line by line (MultiSearch Plus) and write to a metadata field (Filename to Title.) That would give you a start toward scripting this. Just MultiSearch Plus as-is would let you find a list of items one by one and manually rename them.

 

https://exchange.adobe.com/creativecloud.details.101130.utility-script-pack-for-bridge.html

Votes

Translate

Translate

Report

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 ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

You'll have to be more specific.

How do you want to rename the files?

And what are the files going to be renamed to?

Votes

Translate

Translate

Report

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 ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Does the product file system contain the old filename as well as the matching product code? 

Votes

Translate

Translate

Report

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 Beginner ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Yes, it does.

Votes

Translate

Translate

Report

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 ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

Then you are in luck. My expectation is that you can export out of your PLM/DAM a .CSV or other text file containing the old filename (with or without full image path) and the required new product number to use as the filename. As c_pfaffenbichler suggested, it should just be a case of leveraging an existing 3rd party program or a script to batch change the filenames.

Votes

Translate

Translate

Report

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 ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

If I was doing this, my first step would be to preserve the current filename in metadata, and ensure that it was actually preserved. I would either do this via Adobe Bridge or ExifTool:

 

https://community.adobe.com/t5/bridge/batch-rename-preserving-original-filename-and-modified-date/m-...

https://community.adobe.com/t5/bridge/bridge-does-not-preserve-original-file-when-patch-renaming/m-p...

 

Next would be to rename using an appropriate tool that can use a text file from your PLM system.

 

Depending on the software, you may first need to put the product code into a metadata field, then rename using the metadata field. Both of these options are possible with ExifTool.

 

Time permitting I can show some examples to help, as CLI tools can be hard for many users used to driving a computer via a GUI.

 

P.S. There are a few options for exporting and importing metadata listed here at my blog post:

 

https://prepression.blogspot.com/2016/08/extracting-metadata-to-csv.html

 

Adobe Bridge can Batch rename from a limited set of metadata fields so you could possibly do all of this using existing scripts without any further development or using ExifTool.

 

meta.png

Votes

Translate

Translate

Report

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 ,
Jan 16, 2020 Jan 16, 2020

Copy link to clipboard

Copied

LATEST

The following workflow uses ExifTool as that is what I am familiar with. It may not be this easy for you, as I am working with a simplified model where all files are in a single folder called "rename" on the desktop, but it is a start point for your testing (work on copies of the original files).

 

Step 1: Backup the original/old filename to the XMP:PreservedFilename tag as detailed in the links in my earlier post.

 

Step 2: Save out a .csv file from your PLM system, containing the product code and current/old filename. The following .csv example only uses 2 images, however it could be 20,000 images:

 

Code,Filename
0001,test1.psd
0002,test2.psd

 

Step 3: Create a copy of the exported .csv and then edit it in a spreadsheet app to change the column headers over to what ExifTool requires and to also update the full Mac OS image path. In this example, I will be writing the product code to an unused metadata field, the IPTC Extension Suppliers Image ID. I have named this plain text file "import.csv" and it looks like this:

 

XMP-plus:ImageSupplierImageID,SourceFile
0001,/Users/username/Desktop/rename/test1.psd
0002,/Users/username/Desktop/rename/test2.psd

 

Step 4: Use the following ExifTool command to import the product code (by default the original file is renamed with _original for safety, however, an additional CLI argument can be added to overwrite the original files once you are happy that all is working as intended):

 

 

exiftool -sep "," -csv='/Users/username/Desktop/rename/import.csv' '/Users/username/Desktop/rename/'

 

 

Step 5: Finally you can use the following ExifTool command to rename only PSD images:

 

 

exiftool '-FileName<${XMP-plus:ImageSupplierImageID}.%e' -r -ext psd '/Users/stephenmarsh 1/Desktop/rename'

 

 

Note: These commands are formatted for the Mac OS, for Windows swap the straight single quotes for straight double quotes and use appropriate file path formatting. Work on copies of the original files until you are happy with the results.

 

You can then tidy up by clearing out the temp. metadata in the supplier image ID field (or whatever metadata field was used as a placeholder) and or update the preserved filename metadata with the new filename.

Votes

Translate

Translate

Report

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