ERROR_OBJECT_NAME_EXISTS - 698 (0x2BA)
{Object Exists} An attempt was made to create an object and the object name already existed.
Updated: Feb 21, 2026
Technical Background
The ERROR_OBJECT_NAME_EXISTS error is a specific return code indicating that an attempt to create an object using a specified name has failed because the name already exists. This error can occur in various contexts within the Windows operating system, particularly when dealing with file and directory operations.
Error Details
- Error Name: ERROR_OBJECT_NAME_EXISTS
- Numeric Code: 698 (0x2BA)
- Short Description: An attempt was made to create an object and the object name already existed.
This error typically indicates that a named object, such as a file or directory, with the specified name already exists in the target location. The system cannot proceed with creating a new object under this name due to the existing entity.
Common Causes
- Invalid Parameter Values: The operation attempted to create an object using a name that is already in use.
- Incorrect Object Type: The operation was intended for a different type of object, but the specified name conflicts with another object's name.
- Exceeding Limits: In some scenarios, there might be limitations on the number of objects that can exist under a certain name or path.
Real-World Context
This error is commonly encountered in file and directory management operations. For instance, attempting to create a new file with an existing filename in the same directory will result in this error. Similarly, trying to rename a file to a name already used by another file in the same directory will also trigger this error.
Is This Error Critical?
The criticality of this error depends on the context and the operation being performed. In most cases, it is not a critical issue as long as the existing object can be managed or accessed without issues. However, if the operation is part of a larger process that relies on creating new objects with unique names, then this error could indicate a need for additional handling.
How to Diagnose
- Review Operation Context: Verify the context in which the operation was performed. Ensure that the correct path and name are being used.
- Validate Parameters: Check the parameters passed to the API or function call. Ensure they are correctly formatted and do not conflict with existing names.
- Confirm Object Types: Confirm that the object types match the expected operations. For example, ensure that a file operation is not attempting to create a directory with an existing filename.
How to Resolve
- Correct Parameter Usage: Adjust the parameters used in the operation to avoid conflicts with existing names. Ensure that new objects are created under unique names or paths.
- Adjust Operation Context: If the context of the operation needs adjustment, modify it accordingly. For example, if renaming a file, ensure the target name is not already in use.
Developer Notes
When developing applications that interact with the Windows API for file and directory operations, it is crucial to handle this error gracefully. Implement checks to ensure that names are unique before attempting to create new objects. This can be achieved by validating the existence of a name before proceeding with creation or modification operations.
Related Errors
- ERROR_PATH_NOT_FOUND (3): Indicates that the specified path does not exist, which might lead to incorrect assumptions about object naming.
- ERROR_FILE_EXISTS (80): A more generic error indicating that a file already exists, which could be related in some scenarios but is distinct from
ERROR_OBJECT_NAME_EXISTS.
FAQ
Q: Can this error occur with directories as well?
A: Yes, the error can apply to both files and directories. Attempting to create a directory with an existing name will also result in this error.
Q: Is there any way to bypass this error without changing the object name?
A: Bypassing this error by ignoring it is generally not recommended as it could lead to data corruption or other issues. It is better to handle the error and ensure that names are unique before proceeding with operations.
Summary
The ERROR_OBJECT_NAME_EXISTS error (698, 0x2BA) indicates a failure in creating an object due to a name conflict. This error is specific to situations where the specified name already exists. Developers should handle this error by ensuring that names are unique and implementing appropriate checks before performing operations.