DELETE

Used to delete a file or a folder from a document library.

Note! When deleting a folder, all documents and subfolders under that folder will also be deleted.

Syntax

DELETE(string listName, string file);

Example: to delete the file named helloworld.txt from folder Textfiles in document library Shared Documents:

CALL DELETE('Shared Documents', 'Textfiles/helloworld.txt');

Code examples

Delete document

using (var connection = new SharePointConnection(connectionString))
{
    connection.Open();
    using (var command = new SharePointCommand(@"CALL DELETE('Shared Documents', 'Images/bendsoft.jpg')", connection))
    {
        command.ExecuteNonQuery();
    }
}


Skip Navigation Links.

Visa     MasterCard