Am I blind or what? pointing to file

S

Sandra

I just can't get this to work. what am I doing wrong?

I need to link to a file on a server that's not a web server and isn't a
mapped drive so I need to specify the server name and share name. What's
wrong with this?:

a
href="file:///servername/sharename/directoryname/subdirectoryname/filename.d
oc
 
M

Mark Fitzpatrick

What's wrong is the file reference begins at the users computer, not the
server. So, when the user clicks on this it will try to find the file
relative to their computer, searching their local network (if any) for a
server with the appropriate name. This also isn't a good way because the web
server and the anonymous user downloading the file don't have permissions to
access it. You could make a virtual directory in the web server that points
to the directory that the file is in, but again this is tricky because the
proper permissions need to be applied to the file and directory so that the
web server can access it. The best bet is to find a way to get the file
under the web server (that solves the headache of what happens when the
other machine isn't available) somehow.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 
S

Sandra

This is an internal web page and all users will have access to the same
server. The files will remain on a server we user for file storage, not a
web server.

So how can I do this? I'm pretty sure I can, just don't know how.
 
S

Sandra

And I know how to point to a mapped drive. The reason I want to do it this
way is there are possibly hundreds of users who will use this web page and
they may have the drive mapped as some letter other than what I use.
 
S

Steve Easton

For computers on the same "work group" you can use the "Share" name ( computer name ) to
link to.

Here's a method that will work for computers in the same work group.

On "your" computer create a shortcut to the file. Then right click the shortcut, click
properties and then copy the path that displays in Target. Then on your html page click
insert hyperlink, click once in the hyperlink field and then click CTRL+V to paste the
path.

Save the page, preview in browser and test it. I just did this on our network, to an
excel file and it worked.
the link will look something like this:

<a href="file://computername/sharename/foldername/filename.ext">

Sharename can show as either a name or drive letter, if it's just a drive letter it will
look like this:

<a href="file://computername/C/foldername/filename.ext">

Also, when you paste the "target path" FrontPage will reverse the slashes, but that's ok
because href=file takes care of that.

hth
 
Top