open a folder using webpage

<a href="file://myserver/myfolder">Open Folder</a>

I used the above command to open a file folder. But, it works in the intranet only.
When I publish my webpage to public, it doesn't work. how can I make it work again?
akdlzmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dave BaldwinFixer of ProblemsCommented:
The folder would have to be on the web server and in a place where the web server could have permissions to display the files in the folder.  There are a lot of security restrictions on public access thru the web server.
tobzzzCommented:
Hi akdlzm,

Here's some example code that would show you the file contents of c:\test using ASP. You could customize this to show any folder contents and make the files clickable if you wanted.

/ Tobzzz
<%
dim fs,fo,x
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("c:\test\")

for each x in fo.files
  'Print the name of all files in the test folder
  Response.write(x.Name & "<br />")
next

set fo=nothing
set fs=nothing
%>

Open in new window

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sybeCommented:
> But, it works in the intranet only.

It should not work at all. Browsers should not allow that without asking the user permission. You need a trusted ActiveX (IE) or a signed script (other browsers) to get that working.
akdlzmAuthor Commented:
I still need to play around with the demo script you gave me...  but, you gave me what i was looking for. Thank you. =)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Acrobat

From novice to tech pro — start learning today.