There must be a recent change to the Sharepoint Copy File action, because this has definitely worked many times.
I have a file with a '+' character in the filename like this "MyDocument_+abc.pdf"
Let's say the whole URL looks like this:
https://myWeb.sharepoint.com/sites/mySite/documents/MyDocument_+abc.pdf
My workflow should copy this file to another site/library, but I get the following error:
Failed to verify the existence of source object at
"https://myWeb.sharepoint.com/sites/mySite/documents/MyDocument_ abc.pdf"
due to error 'The system cannot find the file specified. (Exception from HRESULT: 0x80070002)'.
It erases the '+' character and replaces it with a blank.
I've already tried to use uri encoding, so the file name would look like this "MyDocument_%2Babc.pdf", but I get the exact same error. I know that this has worked before, because in my company, they use a lot of '+' characters in file names and there was never a problem with the workflow until today. Is there any way to find out if there was a change in December 2021 with the power automate engine and how it handles those special characters?
First, I've found a solution and thanks for your suggestion, it pointed me in the right direction.
So, I've tried your solution first, but at first I got the same error message, as I'm using variables for the Site Address and File Path. When I manually pick the Site and File, it worked like in your post. It seems Power Automate is handling the values from variables and other inputs differently.
What I noticed was, that when you use the actions "Copy File" or "Move File" and manually pick the files via the file explorer, the path gets encoded in a different way when the workflow is running. A blank space is usually %20, but here it's %2b and '+' should be %2B, but it's %252b and so on...
My solution was to double encode the FilePath variable as well and then use that value to copy the file:
encodeUriComponent(encodeUriComponent(variables('FilePath')))
Hi @mks227 :
You could try to get the file id first , and then move the file by id. I've made a test for your reference:
My Flow:
The Result:
Best Regards,
Bof