Hi All,

I have a file system driver that would set the Delete flag in ZwSetInformationFile in order to delete a file and iam using ZwQueryDirectoryFile to walk thorugh the direcotory tree recursively deleting all the files and subdirectories.

The problem that iam facing is, After i have set the Delete flag to the files in the directory and closed the handles to the files, iam not able to delete the directory that has these files. The deletion of direcotory fails with error DIRECTORY_NOT_EMPTY. When i debugged the code, i found that the files are being marked as STATUS_DELETE_PENDING

Now, after i completed the routine i can see that some files( some times all files) have been deleted in the directories but not even one directory gets deleted.

I would be thankful to you guys if you can help me in this problem.

Regards,
harish.