3.2.4.9 Application Requests Deleting a File or Set of Files

The application provides:

  • The Client.TreeConnect representing the share in which the file(s) to be deleted exist(s).

  • The attribute mask of the file(s) to be deleted.

  • The pathname of the file(s) to be deleted.

  • A valid Client.Session.

The client MUST construct an SMB_COM_DELETE Request (section 2.2.4.7.1) message, with the following additional requirements:

  • The SMB_Parameters.Words.SearchAttributes field MUST contain the attribute mask that was supplied by the application.

  • The SMB_Data.Bytes.FileName field MUST contain the pathname that was supplied by the application.

SMB_COM_DELETE (section 2.2.4.7) can be used to delete multiple files if the file name (the final component of the FileName field) contains wildcard characters. The SearchAttributes are used to modify the set of files that can be included in the delete operation.

The request MUST be sent to the server as described in section 3.2.4.1.