Expand my Community achievements bar.

Radically easy to access on brand approved content for distribution and omnichannel performant delivery. AEM Assets Content Hub and Dynamic Media with OpenAPI capabilities is now GA.

Watched folder question

Avatar

Level 4
Hi,



In a thread of 7.x Assembler I read about the possibility to drop a folder into a watched folder to be able to assemble all the files in this folder.



I have a question about this, is there a way to retrieve the name of the droped folder?



regards,



RonnyR
4 Replies

Avatar

Level 4
Ok, I found it.



The %F mapping on the output parameter gives the folder name to the assembled pdf.



Regards,

Avatar

Level 4
Hi,



So, another question:



When I have my Map with the files from the picked folder, is there an easy way to sort these files because I need to assemble them in the correct order. The file names that are in the dropped folder are numbered like filename__1.pdf, filename__2.pdf and they have to be assembled in the exact order.



Anybody have an idea?



Regards,



RonnyR

Avatar

Former Community Member
Here is the DDX to use for the Assembler invokeDDX operation:



<?xml version="1.0" encoding="UTF-8"?>

<DDX xmlns="http://ns.adobe.com/DDX/1.0/">



   <PDF result="result.pdf">

      <PDF sourceMatch="filename__[\d+][.]pdf"/>

   </PDF>



</DDX>



- JK

Avatar

Level 4
Hi JK,



Thanks for your awnser. I will try this in my process.

But I think I managed to do this in a different way.

I made a script in a Excecute Script operation and used Java code to sort a List containing my filenames. After that I used this sorted List to create the DDX, also in the same Excecute Script with Java code.



I tested this a couple of times and it seems to work so far.



Regards,



RonnyR