Get a list of files from a folder

Hello. My first question.

In a printing environment. I have to load dynamically images ( PDF files ) from a folder.

The file to load depends on the folder content that is variable. So I need to create a script that get the list of files in a folder.

Any idea?

You do not need a script…there is already a plugin in Workflow…“Folder Listing” found in the Inputs section.

Thanks hamelj.

I can see this module generates a XML output in Workflow.
I can’t see how integrate this to make a image selection in a template
Sorry but I don’t have many experience with this products.
Regards

You could setup a process in Workflow in which you use the:

  • Folder listing plugin to get the list of images in a folder.
  • Use the XML generated list and extract the images name while saving them temporary into an external file using the Create File plugin / Send To folder plugin with concatenation checked. That will create a file with the name of all images to load.
  • Using Folder capture plugin, you grab that file and using the “%c” system variable (which loads in the whole content of the file) you pass that variable to the Connect Datamapper.
  • In the Datamapper you now have the list of images that you can use in a script and call them.

There is more detail into that solution but this forum is not the place to setup a whole configuration. If you want, we have a team of project specialist that can do it for you; you need only to contact your OL Reseller to get more info onto it. We also have training available either in our Montreal (Canada) office or at your site.

Thanks Hamelj. I think it can be a good approach. I’ll try in this way.
Regards