🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Automator Input Dynamic File Names

User: "Altair Forum User"
Altair Employee
Updated by Altair Forum User

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)

Find more posts tagged with

Sort by:
1 - 4 of 41
    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    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.

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    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

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    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

    User: "Altair Forum User"
    Altair Employee
    OP
    Updated by Altair Forum User

    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.