Hi Team,
I'm trying to copy a excel file from one SharePoint library to a subfolder in the same library.
I want to make sure that if the file of similar name exist then it should get completely replaced by the file being copied.
Hence, in the SharePoint 'Copy File' action I specified the 'Replace' flag for 'If another file is already there' property.
But now everytime I run the flow, instead of replacing the file the original files still persist.
have u experienced this issue before? If so how did you circumvent it.
Ps..
- I tried to delete the file using the 'Delete File' action before running the 'Copy' option, but it always gives me error saying the file is opened and cannot be deleted.
- The file is not opened by anyone else (as only I have access to it) and in the error its mentioned its opened using my credentials. hence I suspect some issue with releasing control once copy operation is done. (not sure thoe)
Solved! Go to Solution.
Hi @RohanWadiwala,
There are serval tips about Excel file locked for editing.
Generally, the Excel file will be locked after you edit it, if you want to delete them, you should wait about 10 minutes.
I tested on my side and find the Replace of the copy file action is not work temporary, as a workaround, I choose to delete the file then create a new one in the other folder with the same name by using original file content:
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi @RohanWadiwala,
There are serval tips about Excel file locked for editing.
Generally, the Excel file will be locked after you edit it, if you want to delete them, you should wait about 10 minutes.
I tested on my side and find the Replace of the copy file action is not work temporary, as a workaround, I choose to delete the file then create a new one in the other folder with the same name by using original file content:
Best Regards,
Community Support Team _ Lin Tu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Although this solution works... it is creating a workaround for the original issue rather than answering the original issue.
The original issue is that the Copy file (SharePoint) action with 'Replace' does not do what it is supposed to do.
Having a workaround only goes so far. The real issue here is that the action does not work correctly. Power Automate is difficult / not user friendly and the 'help' content is minimal. Having struggled to create a flow, it is enormously frustrating and disheartening for it to fail inextricably... because something is broken... then spend an hour online trying to find out how other people fudged it.
I don't want to create a multi-action workaround because the correct single action does not work. Yes, I get it, if it's the only way, then I'll use it... but can somebody help with the actual original problem?
Is there any way to get the single action Copy File (SharePoint) to work as expected???
I was able to achieve this by simply using Create file action instead of Copy file with replace which is deleting the file. When we use the Create file action and if there is a file already in the destination it will add the other version to it.
My flow is as follows.
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
Learn to digitize and optimize business processes and connect all your applications to share data in real time.
User | Count |
---|---|
65 | |
51 | |
30 | |
29 | |
24 |