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
  • 59,865
  • 24
  • 119
  • 170
Jason Kelly
  • 2,539
  • 10
  • 43
  • 80
  • 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
  • 46,179
  • 22
  • 132
  • 191