🎉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 Dynamic Input File Path

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

Attempting to run a daily process which looks for a file in a different place based on the day.

 

X:\1234\BACKUP\08_02_2017_00_43_28\StaticFileName

 

Up to the slash after "BACKUP" is static with the remainder dynamic by day.

 

MM_DD_YYYY is the section I need to qualify on, the rest should be ignored.

 

I'm typically using named paths.

 

Thanks-

Find more posts tagged with

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

    When I set up something like this I select an example file in the named path then edit over the dynamic part with the macros so I don't type anything incorrectly.

    If the date in the name is the same as the day the process is running it would be,

     

    X:\1234\BACKUP\&[MM]_&[DD]_&[YYYY]_??_??_??\StaticFileName   (this is if the time is always 2 characters)

    or

    X:\1234\BACKUP\&[MM]_&[DD]_&[YYYY]_*\StaticFileName   (in case the number of characters for the time change)

     

    Let me know if there was something else that you were looking for.

    Pat

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

    When I set up something like this I select an example file in the named path then edit over the dynamic part with the macros so I don't type anything incorrectly.

    If the date in the name is the same as the day the process is running it would be,

     

    X:\1234\BACKUP\&[MM]_&[DD]_&[YYYY]_??_??_??\StaticFileName   (this is if the time is always 2 characters)

    or

    X:\1234\BACKUP\&[MM]_&[DD]_&[YYYY]_*\StaticFileName   (in case the number of characters for the time change)

     

    Let me know if there was something else that you were looking for.

    Pat

    Thanks for the reply-

     

    It gives me "Node execution failed. Illegal characters in path." when I substitute either the * or ?? for the time section.

     

    Examples I've tried:

     

    \\SERVER\deptdat\Department\Folder Import\&[MM]_&[DD]_&[YYYY]_*\FILE_NAME.002

     

    \\SERVER\deptdat\Department\Folder Import\&[MM]_&[DD]_&[YYYY]_??_??_??\FILE_NAME.002

     

    If I sub the actual digits in for the * or ?? it works correctly, but those will be changing daily.

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

    Thanks for the reply-

     

    It gives me "Node execution failed. Illegal characters in path." when I substitute either the * or ?? for the time section.

     

    Examples I've tried:

     

    \\SERVER\deptdat\Department\Folder Import\&[MM]_&[DD]_&[YYYY]_*\FILE_NAME.002

     

    \\SERVER\deptdat\Department\Folder Import\&[MM]_&[DD]_&[YYYY]_??_??_??\FILE_NAME.002

     

    If I sub the actual digits in for the * or ?? it works correctly, but those will be changing daily.

    Hmm. Not sure there. Only thing I can think of is that the system is reading the digits as numeric values and wildcards cannot be used for that.

    I am going to have to defer to someone else on this for now.

     

    Is the time necessary to the file name? if not you could try to get the source to drop it.

     

    If I have time in the next few days I am going to try play around with this.

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

    Hmm. Not sure there. Only thing I can think of is that the system is reading the digits as numeric values and wildcards cannot be used for that.

    I am going to have to defer to someone else on this for now.

     

    Is the time necessary to the file name? if not you could try to get the source to drop it.

     

    If I have time in the next few days I am going to try play around with this.

    Thanks for thinking about it.

    I'm checking if the time can be excised from the path going forward, but I'm not optimistic.