Rename files in bulk according to CSV table

I have about 10,000 dog images I need to rename according to a csv file. Each image has an id, which is linked to a breed. I would like to rename each file from its id to breedxxx where x is just an increasing number and its breed is corresponding to the id in the csv table. I have attached some images. Thank you all in advance for the support!

Posted on Jan 8, 2021 12:08 PM

Reply
8 replies

Jan 8, 2021 2:56 PM in response to CodingSwiftly

The way I read this is that there will be duplicate breed entries so with each renaming pass involving an id, one must first check for the highest existing numeric increment for that specific breed and then increment the new filename by 1 during the rename operation.


What is an example of a finished rename for the first occurrence of the dingo breed? It isn't clear that it becomes dingo001.jpg, or dingo001_idstring.jpg.

Jan 8, 2021 3:04 PM in response to VikingOSX

Thanks for a lot of your responses on this site. Currently, using one of your other answers, I can rename images using a csv. The issue with this set is that you can't have duplicate names. A finished rename could be dingo001.jpg or dingo001_idstring.jpg; I don't really care as long as I can organize all of the breeds into a subfolders. With either of these renames, I could search "dingo" and make a folder of all of the dingos. Right now, my automation would name all dingo dogs dingo.jpg. Here is the organization I have in mind:

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Rename files in bulk according to CSV table

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.