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?
2 comments on “What does “the path is not of a legal form” mean?”
I run both Kubuntu and Win 7 in a dual-boot configuration. Several years ago I created a file called “Earth: Where We Live,” which is a perfectly valid file name in a Unix-like file system. I stored it on an NTFS partition that I use for work created in either OS. The problem is that NTFS, while running under Windows, chokes on a colon used in a file name. Unix-like OSes have no problem with the colon. Therefore, Linux could open the file just fine but Windows couldn’t even see it. It was completely invisible. After I figured out what the causing the problem and renamed the file to get rid of the colon (using Kubuntu), the file started appearing in Windows.
A real-life example of an illegal path form.
The writer did not identify the OS, but if it’s Windows, this may help.
Click Run, type msconfig, and select Startup. Deselect each item, one at a time, and reboot. If the error message still appears, go back to msconfig Startup, reselect that item and deselect the next one. Continue this process until the computer boots without the error message. That will identify the process causing the problem. Then try reloading the program using that process.
Since it appears at startup and sometimes with the browser, I would start with QuickTime, Java, and Adobe Reader. These are frequently loaded at startup and used by some sites.