This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
The WebDAVMKCOL method creates a new collection at the location specified by the Request-Uniform Resource Identifier (URI). When invoked without a request body, the collection will be created without member resources. When used with a request body, you can create members and properties on the collections or members.
The MKCOL method may be included in the scope of a transaction by submitting a Transaction Header with a lock token that corresponds to that transaction.
|201 (Created)||The collection was created.|
|401 (Access Denied)||Resource requires authorization or authorization was denied.|
|403 (Forbidden)||The server does not allow collections to be created at the specified location, or the parent collection of the specified request URI exists but cannot accept members.|
|405 (Method Not Allowed)||The MKCOL method can only be performed on a deleted or non-existent resource.|
|409 (Conflict)||A resource cannot be created at the destination URI until one or more intermediate collections are created.|
|415 (Unsupported Media Type)||The request type of the body is not supported by the server.|
|507 (Insufficient Storage)||The destination resource does not have sufficient storage space.|
The following example uses the WebDAVMKCOL method to create a collection called pub2/folder1/folder2 on the server www.contoso.com.
MKCOL /pub2/folder1/folder2/ HTTP/1.1 Host: www.contoso.com Content-Type: text/xml Content-Length: XXX
HTTP/1.1 201 Created