Create copy of image and Rename Based on csv

Started by harvey02, June 03, 2020, 03:13:35 AM

Previous topic - Next topic

harvey02

Hi, I have a single image, and I need to make thousands of copies, and Rename them based on file names I have in a CSV file. Is this at all possible with this tool? And, how would I go about doing this?

Thanks!

Phil Harvey

ExifTool doesn't have this functionality built-in, but if you can reformat the CSV file in a spreadsheet to contain only a single column of the output file names then you should be able to loop through this fairly easily with a script and copy the file without using ExifTool.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).

harvey02

Thanks for your reply!
That is what I'm trying to achieve, but I don't know where to get started ;)
Any tips ?

Thanks!

Phil Harvey

Well, the easiest thing would be to reformat the CSV to 2 columns.  In the first column, put "copy SRCFILE" in all rows, where SRCFILE is the name of the file you want to replicate.  The second column should contain the list of destination file names.  Then output the CSV as tab or space-delimited file.  Rename the file to .bat, and execute as a batch file.

- Phil
...where DIR is the name of a directory/folder containing the images.  On Mac/Linux/PowerShell, use single quotes (') instead of double quotes (") around arguments containing a dollar sign ($).