Skip to main content

I am having difficulty identifying the problem below. I am trying to loop to delete files in a folder using sharepoint actions, but the delete files action is returning the following error.

 

I tried directly writing the file path in the action, I tried passing through variables and also using the path obtained by the action of getting files from sharepoint, so far without success. Has anyone ever had this problem?

 

 

This may be due to the following reason: Illegal character in path at index 137: https://namesubdominio.sharepoint.com/sites/RPA-Team/_api/web/GetFolderByServerRelativeUrl('Documentos%20Partilhados/Teste')/Files('Escalas GMUD.xlsx')

Location: teste_onedrive(line 11)

To continue, edit the bot and fix the error. Then, try again.

Have you found the solution for this? I’m facing the same issue while trying to delete file from SharePoint. 


@SJ_08 can you replace %20 with space  and try?


@rbkadiyam There’s no %20 in the File path. Still the error coming.


I'm sorry for the late reply. The suggestion above, which asks to replace "%20" is to use instead of spaces, so depending on the action you use in sharepoint it is necessary to replace it, it would look like this: Shared%20Documents/Test%201.xlsx.

Another solution, which was what solved my case, is that there was a "different space". I don't know how to explain it, but for some reason only one of the spaces in the string was a character different from the normal space, and after rewriting the string and replacing this strange space with the normal space the problem was solved!


Reply