Hello,
I'm working on a Power Automate workflow that takes and excel file in a Sharepoint folder, and creates a duplicate version with the date appended to the file name before the file extension. I've run into an issue with the creation of the new file name that is generating an invalid file name. Below is the code I'm using to create the new file. The output of this is being used in the next, Create file, step to generate the new file.
concat( split(triggerOutputs()?['headers']['x-ms-file-name'], '.')[0], '_', formatDateTime(utcNow(), 'yyyy-MM-dd'), '.', split(triggerOutputs()?['headers']['x-ms-file-name'], '.')[1] )
I'm really new to Power Automate so any and all help will be greatly appreciated.
Starting file: "Payroll Register.xlsx"
Desired outcome: "Payroll Register 2024-08-18.xlsx"
Thank you.