cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Anonymous
Not applicable

One-Way Sync between two Sharepoints (with renaming)

Hello.

 

We need a flow to "duplicate" a folder from one Sharepoint to the other:

 

Our documents are copied into Folder (A) in Sharepoint (1). Then we need a flow to copy it to a Sharepoint (2) into folder (B). So far so good ... that's easy and I already created that flow.

But from time to time we need to rename a file and as we used the trigger "when a file is created or modified in a folder" the file is copied again. And that is the issue ... I want to avoid creating the file again with another name, I want to RENAME it. Otherwise we would have the file with name "X" and a second one with name "X-new". 

On the one hand we create unnecessary copies and we do not have the same content in folder (A) and (B).

 

Hope you have ideas to realize the renaming of files.

 

Thanks and regards.

Christian

2 REPLIES 2
Highlighted
Super User III
Super User III

@Anonymous:

 

Have you considered just overwriting the file in the destination folder and setting the copy file option to replace?  Assuming that versioning is turned on, SharePoint should just create a new version of the document.  The old document should still be there and can be viewed via version history.

 

If this addresses 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
Highlighted
Anonymous
Not applicable

Thanks for the fast reply. I was busy and therefor I couldnt answer as fast as you did.

 

For me it didnt work to use replace as the flow doesnt realize that it is the same doc only with changed name. It seems it compares with the file name and then it simply creates a second file. Finally I have 2 versions of the same doc in my folder, but with a different name ...

Maybe I didnt understand your solution ... if so please show an example how you would create the flow.

 

thanks in advance,

Christian

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

Top Solution Authors
Top Kudoed Authors
Users online (9,772)