Requirement: Rename a file with date format using MS flow
In SharePoint document library an excel file called Employee.xlsx. Now to rename the file to Personsheet with the current date appended in it by using Microsoft Flow.
Steps to rename a File with date in Microsoft Flow:
Click on + Create on Homepage, Select Instant flow, provide name to the flow, select manually trigger a flow, click on create button.
Add an Get File Content action from the SharePoint, Get file content which file name to change in SharePoint.
So, click on the Next Step, then select Get File content – SharePoint action. Then provide the site address and File identifier.
Rename a file with the date
To rename a file create a file in the SharePoint document library. So for this click on the next step and then select Create a file-SharePoint action.
After that provide the site address and Folder path, to save the file. Then provide the file name as the Person sheet and to add date write the below expression:
formatDateTime(utcNow(),'yyyy-MM-dd')
Then add the extension. Next, add the file content from the dynamic content.
Now click on save and run the flow manually, once flow ran successfully.
After that, see the SharePoint document library to store the file is renamed.