cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NikTan
Helper III
Helper III

Rename File while Copying

Hi Team,

I would like to rename file when i am moving document from one Document Library to another Document Library.

 

4 REPLIES 4
ScottShearer
Super User
Super User

Unfortunately, you cannot change the file name by using the Copy File or Move File actions.  However, you can effectively do the same thing by using the Get File Content and Create File actions.  Pleasee see the screen shot below.  This Flow runs succesfully.  To complete the "move", I would add a delete file action at the bottom of the Flow to delet the original/copied file.

 

I pre-pended the file name with "Copy - " in my example.  To do something a little more sophistacted, you could use the string expressions to break apart the file name and create a new name.

 

RenameOnCopy.jpg

 

If this solves your issue, please mark your post as Solved.

 

Scott

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

Hi Scott,

Thanks for your help.

Its working  but sometime it create blank file. Any idea hy it behave like this.

Hi Scott,

Thanks for your help.

Its working  but sometime it create blank file. Any idea hy it behave like this.

IT_Matt188
Regular Visitor

These "Actions" are no longer available in Power Automate. This tread should be archived. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,299)