Cannot delete file in sharepoint

I can delete some file in sharepoint.
I think filename is long string.

Now error as below.

startIndex cannot be larger than length of string. Parameter name: startIndex

Please guide me for solve it.

1 Like

Hi @fairymemay,

I believe you are provind a position that is out of the range.

Example: Let’s say you have this string: “C:\Users\Gustavo.Cervelin\Downloads\file123.pdf”

It’s length is 47.

If you call a function that asks the startIndex and you inform a value greater or equal to 47, it will cause an error.

Try debugging and check the values (string length value and the value you are using as startIndex)

If this solves your problem, kindly mark this post as solution to close this topic.

If you need extra help and/or any question, please let me know :slight_smile:



1 Like


What value are you using as startIndex in this case? And what’s the activity/method you are using?

@gustavo.cervelin I Use activity Delete (Sharepoint) as below.


1 Like

Thanks @fairymemay

Could you tell me what you’ve enter for Library name and Item URL? The screenshot is displaying just a part of them, I want to see the whole instruction

@gustavo.cervelin I will send to you in message.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.