I am trying to rename a column in my file and change it to the current file name. Is there a way to do this? I want it to be able to change with each different file I choose. I'm not sure if the Dynamic Rename tool is the correct tool, and if it is, what expression should I use?
Hey @natalieotto, you can definitely do this. We just need to:
1) Bring in the FileName with the data (Input Data tool configuration)
2) Set up a look-up with the current field name next to the FileName field
3) Use a Dynamic Rename tool, taking field names from the right input's rows
Have attached an example here. Hope this helps!
Thank you, this helped a lot! One last question, in the Formula Tool I entered FileGetFileName and it's asking for a path. What would I put there?
Good to hear @natalieotto! In there you'd place a full file path i.e. C:\User\MyDocuments.... etc and it extracts the FileName at the very end.
One of the Input Data tool options is to bring in the full path so that's a case where you could do that and use this function, or you may just have file paths as part of your data!