Skip to main content
June 30, 2020
Answered

indesign, data merge and subfolders

  • June 30, 2020
  • 5 replies
  • 2105 views

Is there a way too have Indesign pull images from subfolders when using data merge?

I have 6,000+ images in multiple folders, to help keep them organized. eg. H:\Images\JKL\K02501.psd

My InDesign file is on my local computer.

Correct answer Laubender

Yes to your question.

But you have to state the full path of every single image file in your data source file.

 

FWIW: Perhaps it would be easier to run your data merge with a data source file that is in the same folder with duplicates of all your 6,000+ images? Then you would only need to list the file names. Not the whole path.

 

Regards,
Uwe Laubender

( ACP )

5 replies

Community Expert
May 4, 2021

Hi littleConcert,

you said: "I ran the images2csv script to get a csv file and then updated the @images column with filepaths of each indicual artwork. E.g. "

 

Do you have a download URL for that script you could post?

Are you on Windows 10?

 

Thanks,
Uwe Laubender

( ACP )

Sheena Kaul
Community Manager
Community Manager
July 10, 2020

Hi there,

 

I hope your issue is resolved already but in case you need more assistance please reply to this thread. 

Else, if the solution above helped, please confirm. 

 

Regards,

Sheena

ataurr18597239
Participant
April 8, 2021

Hello Sheena,

 

I am facing a different issue. I try to merge data using CSV file, but when I do data merge some pictures go missing from the InDesign generated document. I tried to copy same pictures link for all the cells, but still pictures fails to import. 

There are certain pattern of this issue, like some pictures from a row do not get imported, at some places some pictures in a column fais to import.

May I know the possible reason?

Community Expert
June 30, 2020

Hi apcoinc,

I would simply try this. Start with a couple of file paths only and do a test with data merge.

 

Regards,
Uwe Laubender

( ACP )

Community Expert
June 30, 2020

FWIW: It does not matter where your InDesign template document for data merge is.

The position of the data merge data source file is counting.

 

Regards,
Uwe Laubender

( ACP )

 

// EDITED FOR CLARITY

June 30, 2020

Yes your correct I would not waant to copy paste every image path into my spreadsheet.

 

Do you think in my spreadsheet I could write a formula that would place the last folder location into the path name? eg. H:\Images\KLMN\myimage.psd, I already have the have the first part of the path which is static as "H:|Images\" written in the @Image column then concatenate the file name "myimage.psd" on the end. I could write an if/else the file name begins with a K or L or M or N, look in the KLMN folder else look in OPQR folder and so on. Obviously I didn't write that correctly but you should get the jist of it. It would be a very long string. lol

Participating Frequently
August 1, 2025

A bit late to this party, but this is just the kind of question I like to investigate of a Friday afternoon!

 

I'm by no means an expert in Excel but, with some AI prompting and a bit of experimentation, I was able to get to the following solution, assuming a layout of A=file path, B=file name, C=@image link:

  • To column A ("File path"), add the formula: 
    =CHOOSE(MATCH(LEFT(UPPER(B2),1),{"A","E","I","M","Q","U"},1),
    "H:\images\ABCD\","H:\images\EFGH\","H:\images\IJKL\","H:\images\MNOP\","H:\images\QRST\","H:\images\UVWXYZ\")
  • In column C ("@image link"), write a formula =CONCAT(A2:B2)

 

The CHOOSE formula gets the first character of the image file name and assigns the appropriate path for files in the groups A-D, E-H, I-L, M-P, Q-T and U-Z, so that'd need to be tailored to your specific directory structure.

 

My first draft of this had "H:\images\" in column A, the subfolder in column B and the filename in column C, and required images to be in folders per letter rather than per group of letters because it would simply concatinate column A, the first letter of column B and then column C. While the new formula is long, it works nicely!

LaubenderCommunity ExpertCorrect answer
Community Expert
June 30, 2020

Yes to your question.

But you have to state the full path of every single image file in your data source file.

 

FWIW: Perhaps it would be easier to run your data merge with a data source file that is in the same folder with duplicates of all your 6,000+ images? Then you would only need to list the file names. Not the whole path.

 

Regards,
Uwe Laubender

( ACP )