First thoughts
I am just posting this in case you think of doing something crazy like, why don't I use javascript or JS library to get the path?
It's a DOM element after all.
Well browsers are your enemy!! why? For security reasons, browsers have security restructions like as you have guessed don't expose the local file structure.
Question
What would you do with the file path?
How's a file path going to be handy on the server-side?
Hem, let me think...still thinking.....
The only purpose that I can think of is discovery before attempting a hacking.
Field validation can be an honest answer, but you can avoid this by creating a form that uses AJAX to submit the data to sever.
What??
Yes sir, use ajax submit the data as post, validate it and send a message back to the browser stating if the form was successfully submitted or not.
With ajax you don't leave the page when data is submitted to the server