That’s not an illegal character. It’s a signal for Windows to turn off path mangling. It allows you to have paths longer than MAX_PATH.
As per Naming Files, Paths, and Namespaces:
File I/O functions in the Windows API convert "/" to "\" as part of converting the name to an NT-style name, except when using the "\\?\" prefix as detailed in the following sections.
The Windows API has many functions that also have Unicode versions to permit an extended-length path for a maximum total path length of 32,767 characters. This type of path is composed of components separated by backslashes, each up to the value returned in the lpMaximumComponentLength parameter of the GetVolumeInformation function (this value is commonly 255 characters). To specify an extended-length path, use the "\\?\" prefix. For example, "\\?\D:\very long path".
It appears Windows Explorer was at some point enabled to access long paths. In the process, you can see the following in the “Location” field on a file’s/folder’s property page:
- The “regular” path, if short enough
- The 8.3 names path (something like
C:\WHATEV~1\...), if 8.3 names exist on this file system and if short enough
- The extended-length path otherwise
tl;dr: Your path is too long.