March 3, 2022

Copy a File with New Name in SharePoint Document Library using Power Automate

Introduction

In this blog we will learn how can we copy a file with a new name from one Document Library to another Document Library using Power Automate. Follow the below steps to copy a file with new name:

Steps

Step 1: Add an action for Initialize Variable. Now create a variable for the new file name and give it a value. This value will be the new file name that you want after copying the file. This file name will be with extension.

Step 2: Now, add an action for Get file content.

  • In Site Address field, select the site from which site's document library you want to copy the file.
  • In File Identifier field, select the file which you want to copy using the folder icon of this field.

Step 3: Now, add an action for Create file

  • In Site Address field, select the site where you want to copy the file.
  • In Folder Path field, select the path of the folder where you want to copy the file by clicking on the folder icon. (In above screenshot, we have used dynamic path)

  • In File Name field, select the variable which we have created in first step.
  • In File Content field, add the below expression:
    • body('Get_file_content')

Step 4: Now when this flow will be triggered, it will copy file with the new name.

Conclusion

This is now we can copy a file with a new name using Power Automate. Hope this helps!

If you have any questions you can reach out our SharePoint Consulting team here.

No comments:

Post a Comment