This example will show you how to import files and images from several nested directories. This is very useful when you have stored your images in a structured way and wish to keep this structure in Perfion.
Besides importing the images, this Action example will also mirror the directory on the file system as a category structure in Perfion, allowing you to keep the structure you defined on the file system.
This example is provided as inspiration only. It must be adapted to your Perfion environment to work. Perfion Support does not assist with such adaptations. Please contact your Perfion Partner or your Perfion consultant if you need assistance.
This Action Map consists of two Action, a parent Action in which you specify the root folder and does the importing, and a child Action that will traverse the file system.
Download the Action from the Excel file (ActionMapExampleTraverseFileDirectory.xlsx) attached at the bottom of this page.
Parent Action
In the parent Action you will provide the root folder of the image directories. This Action will also format all the found images and import them.
The first step is the EXECUTE.ACTION command. This will start the child action that finds all of the files in all of the directories. Then wit will format the found files in a format that is accepted by the Perfion Importer and finally import it.
Script For the SELECT:
|
Child Action
The child Action is the one that actually will do the traversing of the directories and finding all of the files.
It will start in the root folder and then call itself on each of child folders, continuing the loop in subsequent folders .
Script for EXECUTE.SCRIPT
|
Comments
0 comments
Please sign in to leave a comment.