Wildcards in Automater

Altair Forum User
Altair Forum User
Altair Employee
edited October 2017 in Community Q&A

hello,

 

I have a process on Automater that runs about 10,000 PDF's, I have these PDF's organized in a folder that contains 272 folders with all pdf's titled a date. I.e.

 

FOLDER>ACCOUNT NAME>10-1-2017

FOLDER>ACCOUNT NAME 2>10-1-2017

 

Each account name folder contains ~60 dates, because of this I want to use a wildcard for the input on Automater, however it fails due to the pdf's being in a folder within a folder. Does anyone know of a work around?

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited December 2020

    Steven,

    You cannot use a wild card character for the folder in the Automator input tab.  You can use a wild card character for the input file.

    If you have the Monarch Server Automator v14.2, then you can use the manifest option to dynamically pass the path and file name with a wild card character in an xml file.

    The following shows a sample xml file for all pdf files in the account name folder:

    <manifest process="ProcessName"> <!-- Process Name-->

      <inputs>

        <item name="pdf">

          <uri>file:C:\PDF\ACCOUNT NAME>*.pdf</uri> <!-- Input file1-->

        </item> 

    </manifest>


    The following shows a sample xml file for all pdf files in the account name2 folder:

    <manifest process="ProcessName"> <!-- Process Name-->

      <inputs>

        <item name="pdf">

          <uri>file:C:\PDF\ACCOUNT NAME2>*.pdf</uri> <!-- Input file1-->

        </item> 

    </manifest>


    In the project input tab you can reference the file name as follows:

    manifest.pdf

    For each subfolder you need to create a new XML file, but only one process that can handle each xml file.


    If you are not currently using Monarch Server Automator v14.2, then you can take a look the following article that describes how to use the Automator StartProcessUsingManifest API method:


    https://community.datawatch.com/docs/DOC-2012


    Regards

    Mo