This wiki has been migrated to and is now deprecated. Please use that site instead.


This infolevel is used with the SMB2/SetInfo command to delete a file.

SetInfo Structure

|             :D|


Delete On Close : This bit when set to 1 means that the file will be deleted upon close.


When Vista deletes a file, it will open the file with SMB2/Create, then use SMB2/SetFile and disposition to 1 and finally SMB2/Close to close the file. Since disposition is set to delete on close the file or direcotry will be deleted.

It would be interesting to see if this method can be used to delete non-empty directory trees as well.

SMB2/SMB2_FILE_DISPOSITION_INFO (last edited 2008-04-12 17:51:48 by localhost)