Hello,
I am trying to rename a file in a SharePoint document library. The flow is when a file is added to a SharePoint team site or Teams site it is moved to another site/document library, this works without issue. To rename the file I am using the split command to get the file name and extension. File name 'Document 01.docx' is renamed to '[_Doumnet 01_]-2022-08-17.docx'. I use this expression to get the file name: split(first(split(outputs('Move_file')?['body/Name'],'.')),'_') and this expression to get the file extension:
last(split(variables('varFullFileExtName'),'.')). How do I get rid of the [_ and _] at the beginning and end of the file name?
Thank you in advance for all of your help.
------------------------------
John Heck
------------------------------