
- Javascript Basics Tutorial
- Javascript - Home
- Javascript - Overview
- Javascript - Syntax
- Javascript - Enabling
- Javascript - Placement
- Javascript - Variables
- Javascript - Operators
- Javascript - If...Else
- Javascript - Switch Case
- Javascript - While Loop
- Javascript - For Loop
- Javascript - For...in
- Javascript - Loop Control
- Javascript - Functions
- Javascript - Events
- Javascript - Cookies
- Javascript - Page Redirect
- Javascript - Dialog Boxes
- Javascript - Void Keyword
- Javascript - Page Printing
- JavaScript Objects
- Javascript - Objects
- Javascript - Number
- Javascript - Boolean
- Javascript - Strings
- Javascript - Arrays
- Javascript - Date
- Javascript - Math
- Javascript - RegExp
- Javascript - HTML DOM
- JavaScript Advanced
- Javascript - Error Handling
- Javascript - Validations
- Javascript - Animation
- Javascript - Multimedia
- Javascript - Debugging
- Javascript - Image Map
- Javascript - Browsers
- JavaScript Useful Resources
- Javascript - Questions And Answers
- Javascript - Quick Guide
- Javascript - Functions
- Javascript - Resources
Open a file browser with default directory in JavaScript and HTML?
If you want to open a file browser in JavaScript and then want to set a default directory same as the file folder, then we cannot do it since windows do not allow you to do so,so it is not possible. For example:
C: :\Amit
This is mainly due to security risk involved to let web code to set any value on the machine.
We can never be assured that even directory exists or not.
- Related Articles
- How to open any file with its default application with PowerShell?
- Cross-browser drag-and-drop HTML file upload?
- Java Program to Open the given URL in System Default Browser in Windows
- How to open a file in the same directory as a Python script?
- How to open a file in read and write mode with Python?
- Ember.js browser support with HTML
- How to open chrome default profile with selenium?
- Open New Browser Tab in Selenuim
- File and Directory Comparisons in Python
- Adding default search text to search box in HTML with JavaScript?
- How to search a directory with file extensions in Java?
- How to open a file in binary mode with Python?
- How to open a file in append mode with Python?
- How to open a binary file in read and write mode with Python?
- How to open a browser window in full screen using Selenium WebDriver with C#?

Advertisements