469,609 Members | 1,933 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,609 developers. It's quick & easy.

Path to URL

Oks, I know I'm going to seem completely stupid here but, I have a question
thats been doing my head in for the last few hours.

Basically, I'm trying to find a way to turn a folder and file path, from the
path, to the actual URL.

For example, if you were to type;

Response.Write <a href=" & folder.name & ">" & folder.name & "</a>"

It would automatically go to the URL of the folder, rather than the file,
but would display the link as the folder's name.

Doing it as;

Response.Write <a href=" & folder.name & ">" & folder.path & "</a>"

Will show the actual server path to the folder (i.e.
e:\myserver\myfolder\current_folder)

What I would like to do is have it so, instead of showing the folder's name,
or path, it would show the actual URL and not the server path, as the
folder.path does........

Hope I'm making sense here?.....

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)

Jul 19 '05 #1
2 4539
You'll have to build it from the URL to the web site containing the
directory that the file is in and the file name. There is no simple way to
map a file path to an HTTP URL even though you are sure that the file is in
a web site (not possible at all if the file is not in a web site).

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Oks, I know I'm going to seem completely stupid here but, I have a question thats been doing my head in for the last few hours.

Basically, I'm trying to find a way to turn a folder and file path, from the path, to the actual URL.

For example, if you were to type;

Response.Write <a href=" & folder.name & ">" & folder.name & "</a>"

It would automatically go to the URL of the folder, rather than the file,
but would display the link as the folder's name.

Doing it as;

Response.Write <a href=" & folder.name & ">" & folder.path & "</a>"

Will show the actual server path to the folder (i.e.
e:\myserver\myfolder\current_folder)

What I would like to do is have it so, instead of showing the folder's name, or path, it would show the actual URL and not the server path, as the
folder.path does........

Hope I'm making sense here?.....

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)

Jul 19 '05 #2
I'VE DONE IT!!!!........WOOHOO!

hehe, probably not the best way but, I've re-written one of the functions I
wrote for one of my VB app's, and it works....kinda

<%
strPath = " - http://" & request.servervariables("SERVER_NAME") &
StripABSPath(fl.Path)

Function StripABSPath(name)
Dim path
path = Split(name, "htdocs")
StripABSPath = path(UBound(path))
End Function

%>
--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
Mark Schupp <ms*****@ielearning.com> wrote in message
news:O2**************@TK2MSFTNGP11.phx.gbl...
You'll have to build it from the URL to the web site containing the
directory that the file is in and the file name. There is no simple way to
map a file path to an HTTP URL even though you are sure that the file is in a web site (not possible at all if the file is not in a web site).

--
Mark Schupp
Head of Development
Integrity eLearning
www.ielearning.com
"Steven Burn" <nobody@PVT_it-mate.co.uk> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Oks, I know I'm going to seem completely stupid here but, I have a

question
thats been doing my head in for the last few hours.

Basically, I'm trying to find a way to turn a folder and file path, from

the
path, to the actual URL.

For example, if you were to type;

Response.Write <a href=" & folder.name & ">" & folder.name & "</a>"

It would automatically go to the URL of the folder, rather than the file, but would display the link as the folder's name.

Doing it as;

Response.Write <a href=" & folder.name & ">" & folder.path & "</a>"

Will show the actual server path to the folder (i.e.
e:\myserver\myfolder\current_folder)

What I would like to do is have it so, instead of showing the folder's

name,
or path, it would show the actual URL and not the server path, as the
folder.path does........

Hope I'm making sense here?.....

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)


Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

31 posts views Thread by John Roth | last post: by
9 posts views Thread by Bengt dePaulis | last post: by
70 posts views Thread by Michael Hoffman | last post: by
34 posts views Thread by Reinhold Birkenfeld | last post: by
2 posts views Thread by Rob Cowie | last post: by
1 post views Thread by William Stacey [MVP] | last post: by
6 posts views Thread by bukzor | last post: by
reply views Thread by Solution2021 | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.