ERROR_DIRECTORY_NOT_SUPPORTED - 336 (0x150)
An operation is not supported on a directory.
Updated: Feb 21, 2026
Technical Meaning
The ERROR_DIRECTORY_NOT_SUPPORTED error code indicates that a specific operation attempted on a directory is not supported by the system or application. This error typically arises when an API call expects to operate on a file, but encounters a directory instead.
Error Details
This error can occur in various scenarios where operations intended for files are applied to directories. For example, attempting to delete a directory using a function designed to delete individual files would result in this error.
Usage Context
The context of the operation is crucial in understanding why an unsupported operation on a directory was encountered. Common operations that may trigger this error include file deletion, file renaming, or specific file attribute modifications when applied to directories.
Developer Interpretation
Developers should interpret this error as indicating that the intended operation cannot be performed due to the nature of the object being manipulated (a directory). The application must adjust its logic to handle directories appropriately, such as by using functions designed for directory operations or ensuring that file-specific operations are only applied to files.
Related Errors
ERROR_FILE_NOT_FOUND(0x2)ERROR_PATH_NOT_FOUND(0x3)ERROR_ACCESS_DENIED(0x5)
FAQ
Q: What does the ERROR_DIRECTORY_NOT_SUPPORTED error mean?
A: It indicates that an operation intended for a file cannot be performed on a directory.
Q: How can I resolve this issue in my application?
A: Ensure that operations are correctly targeted at files and directories. Use appropriate APIs designed to handle both types of objects.
Summary
The ERROR_DIRECTORY_NOT_SUPPORTED error signifies an attempt to perform a file-specific operation on a directory, which is not supported by the system or API. Developers should ensure their applications handle such cases appropriately to maintain robustness and avoid runtime errors.