0

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

Hunter McMillen
  • 56,682
  • 21
  • 115
  • 164
Jason Kelly
  • 2,333
  • 9
  • 35
  • 76
  • JavaScript? Not. IE+ Scripting.FileSystemObject` ActiveX object? Possibly. Other browser + custom plugin? Go write the plugin first. – Rob W Jul 28 '12 at 21:46
  • I would recommend to read this question: http://stackoverflow.com/questions/371875/local-file-access-with-javascript – Samuel Hapak Jul 28 '12 at 21:56

1 Answers1

0

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.

Anirudh Ramanathan
  • 45,145
  • 22
  • 127
  • 184