When I start up, the message appears, “The path is not of a legal form.” And
on occasion when browsing, this will also show up. What does it mean?
In this excerpt from
Answercast #55, I work through how to identify a file that is calling an
“illegal path” error.
Become a Patron of Ask Leo! and go ad-free!
Not of a legal form
It means that something on your computer is misconfigured.
Unfortunately, I can’t tell you what because it really depends on where the
message is coming from (which is often in the title bar of the message box) or
on the actual path that it’s complaining about. For example, it may very
included the path (that it says is not of a legal form) in the message that
complains of the path not being of a legal form.
What does it mean?
So, I can’t really answer to where it’s coming from or even what to do about
it. But I can at least talk a little bit about what it means for a path to be
of a legal form.
A “path,” first of all, is the string that identifies where on your computer
a file lives.
For example, if you have a file in a folder called My Documents at the root
of your C drive and the document’s name is “document.doc,” then the full path
for that would be C:/MyDocuments/document.doc.
That gives every bit of information to locate that file on your hard
C: is the drive.
My Documents is the folder.
- Document.doc is the file.
That’s a path.
Now, that of course (what I just described) has what I consider to be “a
The problem is that there are characters that are not allowed to be used in
file names and in folder names or they are more difficult to use in file
names and folder names and, if used improperly, will cause this kind of
For example, you would be hard pressed to create a file that has a vertical
bar in its file name. You would be hard pressed to create a file that has a
greater-than sign or a less-than sign in its file name.
If you were to attempt to do that, you’d get an error message of some
The error message
Now, what’s happening in a case like this (“This path is not a legal form”)
is that there is some kind of an error in the path that is specified by some
application’s configuration setting.
There’s some kind of error (along the lines of an illegal character or it
may be something else) that is causing whatever is trying to process that path
to give up; to say, “You know what? I can’t do what I need to with this
because it’s of an illegal form. It’s not right. There’s something wrong with
this specification to a file.”
Identify the program
Now, what is happening? If it’s happening at start up and it’s happening
occasionally, the only way to know where this coming from is to try and
identify the program that’s displaying the error message at the time it’s
But that’s the kind of a thing that’s going on. There is something wrong
with a file name that has been specified as a parameter as a configuration
option to a program that you are running at start up, and then occasionally
as you’re browsing.
To be honest, to be fair, it may not be something you’ve configured. It may
be some kind of configuration that was improperly set by the program’s set up
or it was something that was modified perhaps even by malware. I mean there
are many different ways that this kind of an error can happen.
But that’s fundamentally what it’s all about. It’s complaining about a file
name that it can’t figure out where the file is.
Next from Answercast 55 – How
can I retrieve some photos on a failed hard drive?