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
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Users online (27,524)