• 0

Open an explorer.exe folder in HTML


Question

travelcard

Hi there,

i want to be able to have a link in my HTML page so that when the user clicks it, it will open a folder on the local hard drive - c:\windows for example.

Any javascript onclick function I've tried keeps coming up with the ActiveX warning since SP2. Anyone know how I can do it (even with the activex warning if nothing else works as I haven't been able to get the onclick function to work properly.)

Thanks for your help.

Link to post
Share on other sites

19 answers to this question

Recommended Posts

  • 0
Tommy2k4

file://c:\windows\ may work

Link to post
Share on other sites
  • 0
bfoos
Hi there,

  i want to be able to have a link in my HTML page so that when the user clicks it, it will open a folder on the local hard drive - c:\windows for example.

  Any javascript onclick function I've tried keeps coming up with the ActiveX warning since SP2. Anyone know how I can do it (even with the activex warning if nothing else works as I haven't been able to get the onclick function to work properly.)

Thanks for your help.

585326995[/snapback]

Why would you want a user to click a link to open up a folder? Sounds kind of shifty to me. :shifty:

Link to post
Share on other sites
  • 0
travelcard
Why would you want a user to click a link to open up a folder? Sounds kind of shifty to me.  :shifty:

585327004[/snapback]

I knew someone would say that :D

Just making a menu system for a directory on the server at work.

Link to post
Share on other sites
  • 0
travelcard
file://c:\windows\ may work

585327010[/snapback]

Well, that kinda gets somewhere when it's written like this:

<html>
<head>
<title>test</test>
</head>
<body>
<a href = "file://c:/windows/"> windows</a>
</body>
</html>

Except the link opens in Internet Explorer not Windows Explorer. Any more ideas?

Link to post
Share on other sites
  • 0
Advance

I am fairly sure that is impossible in HTML.

Link to post
Share on other sites
  • 0
travelcard
I am fairly sure that is impossible in HTML.

585327633[/snapback]

Ok, how about in Javascript or VBScript then?

Link to post
Share on other sites
  • 0
Klownicle

If you want to view the drive that is currently viewing the page file:// should do it.

Or mabye get some applet or somthing.

Link to post
Share on other sites
  • 0
j79zlr
Well, that kinda gets somewhere when it's written like this:

<html>
<head>
<title>test</test>
</head>
<body>
<a href = "file://c:/windows/"> windows</a>
</body>
</html>

Except the link opens in Internet Explorer not Windows Explorer.  Any more ideas?

585327493[/snapback]

IE and Windows Explorer are the same thing.

Link to post
Share on other sites
  • 0
j.r.l.

It is impossible to load a folder on your computer using another computer. That would be an extreme security risk. Try putting the folders in your htdocs folder (Y)

Link to post
Share on other sites
  • 0
gigapixels
IE and Windows Explorer are the same thing.

585333426[/snapback]

Exactly. Go ahead and open up IE right now, and replace what's in the address bar with "file://C:/Windows" and the toolbar changes to the explorer toolbar. That's the way you're going to do it.

EDIT: Do you want to open it in a new window? Try

target="_blank"

That will open it up in a new window that is Explorer (since we showed that IE and Explorer are the same).

Edited by fubarshibby
Link to post
Share on other sites
  • 0
travelcard
IE and Windows Explorer are the same thing.

585333426[/snapback]

No they're not. All the files and folders open up as hyperlinks.

Link to post
Share on other sites
  • 0
travelcard
Try putting the folders in your htdocs folder (Y)

585333528[/snapback]

What is that? I've never come across it before. Thanks.

Link to post
Share on other sites
  • 0
j79zlr
No they're not. All the files and folders open up as hyperlinks.

585335856[/snapback]

What are you talking about? As soon as IE open up a folder on the local machine, it changes into Windows Explorer. I would really like a screenshot showing the problem you are having.

I'm confused here, are you trying to display the USER's C:\Windows directory, or the directory on the server? If you are trying to show the directory on the server, then you would need to place it in your webserver's folder, like AresXP said.

Link to post
Share on other sites
  • 0
gigapixels
No they're not. All the files and folders open up as hyperlinks.

585335856[/snapback]

Will Ferrel from "Old School": You crazy man... I like you, but you crazy...

Dude, just make a test html page to test on your own computer and put a link to "file://C:/windows" in it. You'll see that j79zlr and I are correct.

Link to post
Share on other sites
  • 0
+M2Ys4U

if you're using Firefox, however, it won't work.

Link to post
Share on other sites
  • 0
j.r.l.
if you're using Firefox, however, it won't work.

585336735[/snapback]

You mean all browsers except IE :rolleyes:

Link to post
Share on other sites
  • 0
+M2Ys4U

well, yes, I did. lol

Link to post
Share on other sites
  • 0
gigapixels
if you're using Firefox, however, it won't work.

585336735[/snapback]

Well, it looks like it's for his work, so hopefully the business has a standardized environment on the desktop, and he won't have to worry about people using anything but IE.

Just making a menu system for a directory on the server at work.

585327449[/snapback]

Link to post
Share on other sites
  • 0
micromegas

Is the folder the same all the time?

this wouldn't exactly be a one click solution, but you could have the user download and open a vbs file that calls Run to invoke explorer.

could you explain the real problem you are trying to solve. If you have access to all of the users computers then you can make use of WSH.

Link to post
Share on other sites
This topic is now closed to further replies.
  • Recently Browsing   0 members

    No registered users viewing this page.