Hello,
How do I setup the output file name to automatically change the date portion based on the Input file name. For example, the input file is named 2021-04-30 GL 331115 State. I want the output file name to be 2021-04-30 CR TX Gasoline Workpapers.
Only the date changes, the rest of the file name is always the same. I tried looking up other post about this, but they are not quite the same.
Thank you,
Laurie
Hi @Lauriek
Depending on the type of file you're outputting to this might change slightly, but generally you can use a formula tool to create a file name, and then in the output tool use the settings to take the filename from a field in the data. For this instance you will want to do the following:
Bring the filename into your workflow and edit it via regex_replace as attached.
note @Luke_C 's way works too assuming relatively static filenames.
Hi @Lauriek ,
I'm assuming you're loading in Excel files, so in your input tool, select from the dropdown to bring in the filename as a field:
Then, on that field you can use the regex tool to remove the existing date, then a formula tool to add today's date to the start of the filename:
Hope this helps,
M.
Hello,
Both files are excel.
Hi Luke_C,
Both input and output files are excel.