Automator Input Dynamic File Names

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

I need to import the latest version of a file located in a named path folder.

 

Can anyone point me to a guide for what Automator can work with?

 

The format for my file names is as follows.

 

XXXXXXXXX_YYYYMMDDHHMMSS_XXXXX

(where X could be any character but static for each report title, and the date/time is when the report was created)

Tagged:

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2017

    Update- I've figured out the YYYY, MM, DD. (&[YYYY]&[MM]&[DD] etc.)  I'd like to ignore the HHMMSS as they will be impossible to match, but continue with the second set of XXXXX.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2017

    Hi Craig,

     

    Are you using Automator for this? If so, for the  HHMMSS you can either do "?" for each character or * for a string of characters until the _XXXX begins. Found in the DataWatch help of Monarch, the ? in the top right. The note below says it doesn't work with numeric values but I have used it before like my examples.

    So you would be looking at something like this:

    XXXXXXXXX_&[YYYY]&[MM]&[DD]??????_XXXXX  or

    XXXXXXXXX_&[YYYY]&[MM]&[DD]*_XXXXX

     

    Also if the date is for yesterday

    XXXXXXXXX_&[YYYY.-d]&[MM.-d]&[DD.-d]*_XXXXX

     

    I hope this helps.

    Pat

    image

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited July 2017

    Hi Craig,

     

    Are you using Automator for this? If so, for the  HHMMSS you can either do "?" for each character or * for a string of characters until the _XXXX begins. Found in the DataWatch help of Monarch, the ? in the top right. The note below says it doesn't work with numeric values but I have used it before like my examples.

    So you would be looking at something like this:

    XXXXXXXXX_&[YYYY]&[MM]&[DD]??????_XXXXX  or

    XXXXXXXXX_&[YYYY]&[MM]&[DD]*_XXXXX

     

    Also if the date is for yesterday

    XXXXXXXXX_&[YYYY.-d]&[MM.-d]&[DD.-d]*_XXXXX

     

    I hope this helps.

    Pat

    image

    Patrick,

     

    If fields that look like dates or numbers have been "extracted" as character (or converted to character type or otherwise treated as character) I suspect the constraint you highlighted would not apply.

     

     

    Grant

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited August 2017

    Hi Craig,

     

    Are you using Automator for this? If so, for the  HHMMSS you can either do "?" for each character or * for a string of characters until the _XXXX begins. Found in the DataWatch help of Monarch, the ? in the top right. The note below says it doesn't work with numeric values but I have used it before like my examples.

    So you would be looking at something like this:

    XXXXXXXXX_&[YYYY]&[MM]&[DD]??????_XXXXX  or

    XXXXXXXXX_&[YYYY]&[MM]&[DD]*_XXXXX

     

    Also if the date is for yesterday

    XXXXXXXXX_&[YYYY.-d]&[MM.-d]&[DD.-d]*_XXXXX

     

    I hope this helps.

    Pat

    image

    Thanks all- I've got a slightly different question on dynamic paths posted if you have thoughts.  Thanks again.