Showing results for 
Search instead for 
Did you mean: 
Frequent Visitor

How to rename SharePoint list attachment file name or append the date/time to the file name


I would like to create flow to rename the file name of the sharepoint list attachment. Please let me know if anyone has any idea on how to do it. I am new to MS-Flow. 

For e.g:

User uploads Lotus.jpg and I want to rename it as June-19-5:00PM-Lotus.jpg

Or even June-19-Lotus.jpg is fine. 

Thanks in advance.



Hello @yashag2255 


I have applied what you are describing but this changes every time the name of the attachment. So if I want the next day to attach a new file then modifies all the previous to the today's date. Do you know how this can stop and just apply the rule when a new attachment is added?

Hi @yashag2255 
Thanks for this solution. I have one more question:
What trigger are you using before 'get attachements'? I use a trigger 'when item created or modified'. However, this seems to loop so the attachment file name keeps on adding the date.

Is there a trigger to only change the attachment you upload or maybe condition you can apply? 

Kind Regards

Frequent Visitor

Hello, I was reading the solution, but I still have problem with the flow. It deletes old name of first attachments, and then, instead of going to the next attachment it still checks the first-already renamed, and says that all the names are already renamed. I have used the same Flow as you, with For each loop. Please help

Helpful resources

Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Users online (3,282)