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.
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.
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,