• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1011
  • Last Modified:

access unc path with window.location redirect

If I go into IE I can type a UNC path (\\kevin2004\c) in the address bar and it will pull up the folders on my local hard drive.
I want to do the same thing using the window.location redirect javascript but the syntaxn doesn't seem to be working.
Any thoughts?
  • 2
2 Solutions
Hi kevinvw1,

 Yes IE us embeded into the Operating system and will switch to Normal Windows Explorer on a UNC. Javascript has already defined the browser as a webpage and will not be able to use UNC's.

put file://kevin2004/c

at the beinging of your unc path otherwise it will default to http://kevin2004/c

kevinvw1Author Commented:
andrew, I didn't quite clarify, I am concatenating the path.  Also, this is running inside an non-web application (GoldMine CRM).
They have an embedded browser view that allows you to pass field info from the application into the embedded IE browser.

Currently I have the following -

window.location = "<<&Key5>>"
Where &Key5 represents a text field in the goldmine application.
If the Key5 field contains file://kevin2004/c/clients/1234
everything works perfectly.
What I need though, is to hard code the "file://kevin2004/c/clients/" portion and
Key5 field will contain only the final destination folder (1234).

kevinvw1Author Commented:
One more thing, GoldMine automatically handles the replacing of the "&amp:Key5" with the appropriate data that is being stored in the Key5 field.

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now