Unable to delete a folder using sharepoint activites

I am trying to delete a folder that is residing in sharepoint and encoutering “File Not Found” error.
image

I am using UIPath team sharepoint activities

can you show me the provided path?

Regards,
NaNi

image
I am trying to delete Folder4

If i use create a folder with the same location and same library, it is working fine. However, deletion is having an issue.

Hi!

Do one thing provide this in a variable and call the variable in RelativeUrl.

This may works for you

Regards,
NaNi

I have kept inside a variable and Still the same issue.

RemoteException wrapping Microsoft.SharePoint.Client.ServerException: File Not Found.
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponseStream(Stream responseStream)
at Microsoft.SharePoint.Client.ClientRequest.ProcessResponse()
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQueryToServer(ChunkStringBuilder sb)
at Microsoft.SharePoint.Client.ClientRequest.ExecuteQuery()
at Microsoft.SharePoint.Client.ClientRuntimeContext.ExecuteQuery()
at Microsoft.SharePoint.Client.ClientContext.ExecuteQuery()
at UiPathTeam.SharePoint.Utils.DeleteFromSharePoint(ClientContext clientContext, String relativeUrl)
at UiPathTeam.SharePoint.Activities.Libraries.Delete.Execute(CodeActivityContext context)
at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.ActivityInstance.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)

this thread is same like you.

Regards,
NaNi

This dint helped. In my case, I am able to create , upload, download without any issues. The issue is only with the Delete

1 Like

Hi Pavan,

I’m having exactly the same issue as you. The DELETE activity from Sharepoint activities plainly DOESN’T WORK, or it does in a different, non-documented way, to all other related activities.

As you, I’m also able to CREATE and UPLOAD without any issues. The DELETE activity uses exactly the same parameters I’m using in the CREATE folder activity, which immediately follows my delete one (so, basically, I’m trying to DELETE a folder in Sharepoint before CREATING it so, in case it existed, it’s gonna get current time and date, that is, the “recreation” time&date instead of the original one). But it fails, throwing a “FILE NOT FOUND” error.

I’ve been trying even with empty folders (because the one I’m trying to delete is not empty and I have no idea -as, as usual, the docs don’t say anything about this- if that was the cause of error), with files, etc. I’ve also played a lot with the “Library Name” and “Item URL” parameter for the activity (even if, for coherency, they should be exactly THE SAME as in the CREATE FOLDER activity, which I’m using with those same parameters and it works flawlessy), and that all. But no luck.

Please fix this and write proper documentation, HOMBRE!!


2023-09-14 123910 file not found

EDIT: I FOUND THE SOLUTION

After hours of trial and error, I found out just by chance that, in this activity, for whatever $%&(“$·(Q&%)”·$& nonsensical reason, the “Library Name” parameter had to be “Documentos Compartidos” in my case, NO MATTER IF THE SAME PARAMETER IN ANY OTHER ACTIVITY OF THE SHAREPOINT PACKAGE HAD TO BE SIMPLY “Documentos”, without anything else.

So in your case you better try with “Documents”, “Shared Documents”, your localized names for those combinations, and that all.

To further complicate things, in my case when I access the Sharepoint site, the name of the folder is furtherly localized, in this case to the local language, Catalan, so what I see is neither “Documentos” or “Documents” or “Documentos Compartidos” or “Shared Documents” but what I see is “Documents”:

Captura de pantalla 2023-09-14 132110 DOCUMENTS

Who’s the one to blame for this? I have my theory…