SP.Web.getFolderByServerRelativeUrl(serverRelativeUrl) Method

SharePoint 2010

Last modified: May 27, 2011

Applies to: SharePoint Foundation 2010

In this article
Return Value
Applies To

Returns the folder object located at the specified server-relative URL.

var value = SP.Web.getFolderByServerRelativeUrl(serverRelativeUrl);


A string that specifies the server-relative URL for the folder.

Type: string

You must have Browse Directories permissions to run code that uses the GetFolderByServerRelativeUrl method.

It must not be null.