Automator Dynamic Input File Path
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-
Answers
-
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
0 -
Altair Forum User said:
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.
0 -
Altair Forum User said:
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.
0 -
Altair Forum User said:
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.
0