I'm using this guide: https://www.sharepointwidgets.com/2020/07/rename-folder-using-microsoft-flow.html
When the folder name i'm trying to rename has a single quote in it, it fails. I've tried adding a encodeUriComponent() to the variable resulting in the underlined string below, but it still fails.
Error:
<?xml version="1.0" encoding="utf-8"?><m:error xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata"><m:code>-1, Microsoft.SharePoint.Client.InvalidClientQueryException</m:code><m:message xml:lang="en-US">The expression "web/GetFolderByServerRelativeUrl('Shared Documents/General/TEST/Carlo's Test/FolderTemplate')/ListItemAllFields" is not valid.</m:message></m:error>
clientRequestId: 47034f39-9c02-4071-b076-03eb5956e9e9
serviceRequestId: fab5caa0-c0c2-3000-f88f-aa1419c79fe5
Months ago I remember trying to set up an HTTP request that could accommodate a SPList name with single quote. I was going to have the SPList name in a variable and then put it into the HTTP request.
I wanted it to be an example other people could use no matter what the name of this list was set to.
I tried and tried for hours to come up with a way to get it to work. I never could.
I know that doesn't help, but my end conclusion was, "They shouldn't put those special characters in a list name". I would be thinking the same thing about folder names.
Hi @carlom_iptech ,
You can use double single quote to solve it.
If your folder name is <Test1'Test2>, please try to use Test1''Test2 in the request url.
Best Regards,
Wearsky
Issue is when the original folder’s name has a single quote.
Issue is when the original folder’s name has a single quote.
Michael E. Gernaey
566
Super User 2025 Season 1
David_MA
516
Super User 2025 Season 1
stampcoin
492