In short: You can't to that automatically.
Access the local filesystem from any browser is blocked for security reasons. Reason: Imagine any website being able to access the files on your filesystem.
Read this: Local file access with javascript
Maybe you want to rephrase your question and say what you actually want to acheive.
You can access simple file information using the user's input and using <input type=file>
. But the user would require to do the following steps:
- Click the "Browse button" (a file dialogue appears).
- Navigate to the requested folder.
- Select 1 or many files.
- Click "Open".
Mozilla has documented this well with an example: https://developer.mozilla.org/en/docs/Using_files_from_web_applications#Example_Showing_file(s)_size