| Previous | Next |
| ERROR_DIR_NOT_ROOT | ERROR_IS_SUBST_PATH |
ERROR_DIR_NOT_EMPTY
The directory still contains entries
ERROR_DIR_NOT_EMPTY is returned when a directory-removal operation targets a folder that still contains files or subdirectories. Hidden, system, reparse-point, or concurrently created entries may be involved.
What to check
- Enumerate the directory immediately before removal and include hidden entries.
- Check whether another process is creating files during cleanup.
- Handle reparse points without unintentionally traversing outside the intended tree.
- Distinguish this result from sharing or access-denied failures on individual children.
How to handle it
Remove only content the application owns, then retry the directory removal. Recursive deletion should validate paths carefully and report any child that could not be removed.
References
Looking for a different code? Search another status or error code.
