Update file name is a SharePoint document library folder
One of my projects, i got a requirement to change the file names in SharePoint document library folder. We can update the document name using the steps below.
Get SharePoint files in a folder using the Fet SharePoint files action below,
On each file update the file name using Send HTTP action with following details.
Site Address: <<Site Address>>
Method: Post
Uri: _api/lists/GetByTitle('<<Document Library Name>>')/Items(<<ITEM ID>>)
Headers:
Content-type: application/json
IF-MATCH: *
X-HTTP-METHOD: PATCH
Body:
{'__metadata':
{'type':'<<SharePoint Document type>>'},
'FileLeafRef':'<<File Name to be Updated>>'}
Comments