| Previous | Next |
| ERROR_INSUFFICIENT_BUFFER | ERROR_INVALID_LEVEL |
ERROR_INVALID_NAME
The supplied name is syntactically invalid
ERROR_INVALID_NAME means Windows cannot parse the requested filename, directory name, device path, or volume label. Common triggers include forbidden characters, reserved device names, malformed prefixes, trailing spaces or periods, and incorrect UNC syntax.
Validation points
- Apply Windows path rules to each component, not only the whole string.
- Handle UNC, extended-length, and device namespaces deliberately.
- Reject reserved names such as legacy console and port aliases where applicable.
- Do not remove characters silently when that could change the destination.
Recovery
Ask for or generate a valid replacement name and preserve a clear mapping from the original. When importing names from another operating system, use an explicit reversible escaping policy. Verify that normalization does not create collisions between distinct source names.
References
Looking for a different code? Search another status or error code.