cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MarkG-ITC
New Member

Copy File to multiple folders and rename the file based on the folder name

Hi,

 

I am trying to create a copy of a file into multiple subdirectories and rename the file to include the name of the subdirectory in the file name, on sharepoint.

 

Eg.

Directory structure:

ParentDirectory-

            sub-directory1

            sub-directory2

 

Create a file in ParentDirectory:

file1.docx

 

The result would be:

ParentDirectory-

file1.docx

            sub-directory1

                                    sub-directory1.docx

            sub-directory2

                                   sub-directory2.docx

 

Any help appreciated.

 

Thanks

Mark

2 REPLIES 2
OceanA
Advocate IV
Advocate IV

Use the sharepoint Create file action to add the file all to the subdirectories you want. If you know the folder path of the subdirectories, you can use the Initialize a variable action to create an array of the subdirectories' paths, then apply to each path in the array, the file creation in sharepoint.

 

OceanA_0-1597000536546.png

 

 

Tom_Slosse
Memorable Member
Memorable Member

Hey @MarkG-ITC 

 

 

Did you try out the suggestion provided by @OceanA?

Please let us know if this worked for you

 

Kind regards

 

Tom



If this reply has answered your question or solved your issue, please mark this question as answered.

Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.

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.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (1,750)