2.2.4.58 SMB_COM_SEARCH (0x81)

This is an original Core Protocol command. This command is deprecated. New client implementations SHOULD use the TRANS2_FIND_FIRST2 subcommand (section 2.2.6.2) instead.

The SMB_COM_SEARCH command searches a directory for files or other objects that have names matching a given wildcard template. The response message contains as many of the found names as can fit, given the maximum buffer size. The response message also contains a continuation key that MAY be used in subsequent SMB_COM_SEARCH command messages to return the next set of matching names.

This command returns only 8.3 name format file names, and the base set of file attributes. Unicode is not supported; names are returned in the extended ASCII (OEM) character set only. There is no close operation associated with SMB_COM_SEARCH. The server MUST maintain search state until the end of the search is reached, the PID or TID associated with the search is closed, the UID associated with the search is invalidated (logged off), or the session is closed.