| Previous | Next |
| STATUS_LOCK_NOT_GRANTED | STATUS_CTL_FILE_NOT_SUPPORTED |
STATUS_DELETE_PENDING
STATUS_DELETE_PENDING means that deletion has already been requested for the object, but its lifetime has not ended yet. For files and directories, Windows can mark the object for deletion and defer the actual removal until the relevant handles are closed. The name may therefore still be visible briefly while operations on the object begin to fail.
Why this happens
Deletion in the Windows file system is tied to handle lifetime and sharing rules. A caller needs appropriate delete access to request a deletion disposition, and handles that do not permit deletion can prevent the request from succeeding in the first place. Once deletion is pending, later opens, notifications, or operations that require the object to remain usable can receive STATUS_DELETE_PENDING.
What to check
- Determine which process requested deletion and which handles are still open.
- Check whether temporary-file or delete-on-close logic is being used.
- For a directory, verify that no outstanding work continues to use a child path after cleanup has started.
- Do not recreate or rename the same path blindly until the previous object is fully closed and the namespace state is known.
This is a state-transition status, not evidence that the object was already absent. A robust cleanup path should treat it as a signal to stop using the current handle or wait for the deletion lifecycle to finish, depending on the operation.
See Closing and Deleting Files, SetFileInformationByHandle, and the FileDispositionInformation specification.
Looking for a different code? Search another status or error code.