Wednesday, June 20, 2012

Specific file or folder name is too long in sharepoint

Here is the issue while we upload files or create folder to sharepoint document library.

Usually get an error saying that "Specific file or folder name is too long".

Reason : Every sharepoint file name has limited number of characters, It will check for this condition before upload file to sharepoint.

Solution : Sharepoint object model has provided a beauty of way to check for the file name validity.

Here is the code :


It will return weather all the conditions are passed before upload it to sharepoint.

Thank you

1 comment:

  1. With Path too long error I use "Long Path Tool" to get fast and easy fix .