Getting a file path from a filename
-
13-12-2019 - |
Question
I need your help.
How can I use javascript to find the filepath based on a given file filename?
ie.
the function would execute to find the database.mdb to be contained in: C:\primaryfolder\database\database.mdb
function find_filepath("database.mbd") {
alert(filepath)
}
Thanks for everyones help in advance
Much thanks and appreciation
Cheers
Jay
Solution
JavaScript in modern browsers cannot directly access the filesystem. They are in a sandbox. You could use IE and ActiveX for what you are trying to do.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow