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 III
Advocate III

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
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,964)