5 Replies Latest reply on Apr 24, 2017 11:53 AM by try67

    Help Inserting Page From File For Many Files And Repeating For Many Folders

    bcblmb

      I have a simple action that I am having trouble expanding into a repetitive process one level higher.

       

       

      Problem:  Have a cover page PDF for personal records PDFs.  The cover page needs to be inserted before the first page in each personal record PDF for each person.  The cover page is unique for each person.

       

       

      Problem overview:

      - Have records for many people

      - Each person has a cover page (00.pdf)

      - Each person can have 1-99 record PDFs

      - Each Person has a folder named their name

      - All files for the Person are located within their Name Folder

       

       

      I have two ways of structuring the organization of the cover page (00.pdf) and personal records (01.pdf-99.pdf):

      1. All files within the root of the Name folder

            \Smith,Jane\00.pdf, 01.pdf ...10.pdf

      2. Cover page in root of Name folder and All personal records within a Records subfolder

            \Smith,Jane\00.pdf

            \Smith,Jane\Records\ 01.pdf ...10.pdf

       

       

      I can easily create an action to Insert the cover page PDF before the first page of each personal record PDF for a SINGLE PERSON (Smith, Jane).

       

       

      My sticking point is automating this to process ALL the person folders.  In other words, just extend this out as a loop to process all folders of the next higher level (\People) -

        \People\

            \Able, Andrew

            \Smith, Jane

            \Smith, John

       

       

      I am not a JavaScript expert, but understand basic programming.  This would appear to be a fairly basic problem if I knew more about the programming involved.  I would think a "For" or "While" loop or equivalent would need to be involved.

       

       

      Thanks in advance for your help.

      bcblmb