The delete file message is sent to delete a data file. The appropriate tid and additional pathname are passed. Read only files may not be deleted, the read-only attribute must be reset prior to file deletion.
Client Request ================================== |
Description ================================= |
UCHAR WordCount; | Count of parameter words = 1 |
USHORT SearchAttributes; | |
USHORT ByteCount; | Count of data bytes; min = 2 |
UCHAR BufferFormat; | 0x04 |
STRING FileName[]; | File name |
Multiple files may be deleted in response to a single request as SMB_COM_DELETE supports wildcards
SearchAttributes indicates the attributes that the target file(s) must have. If the attribute is zero then only normal files are deleted. If the system file or hidden attributes are specified then the delete is inclusive -both the specified type(s) of files and normal files are deleted. Attributes are described in the "Attribute Encoding" section of this document.
If bit0 of the Flags2 field of the SMB header is set, a pattern is passed in, and the file has a long name, then the passed pattern much match the long file name for the delete to succeed. If bit0 is clear, a pattern is passed in, and the file has a long name, then the passed pattern must match the file's short name for the deletion to succeed.
Server Response ================================== |
Description ================================= |
UCHAR WordCount; | Count of parameter words = 0 |
USHORT ByteCount; | Count of data bytes = 0 |
ERRDOS/ERRbadpath
ERRDOS/ERRbadfile
ERRDOS/ERRnoaccess
ERRHRD/ERRnowrite
ERRSRV/ERRaccess
ERRSRV/ERRinvdevice
ERRSRV/ERRinvid
ERRSRV/ERRbaduid