Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

activex

Status
Not open for further replies.

jscorpion

Programmer
Nov 17, 2000
40
US
The problem I am having is finding the default directory in the weblike server we are using. It does not have normal paths and the address I am could change with distribution. I need to know the location I am at by where the cab is located or what the address box say in explorer. If I do a app.path it gives me the location of the exe. I need to know where the path is when the program is downloaded onto internet explorer. So I can access that directory for other htm's stored there.

hope you can help

thanks
jscorpion
 
I don't understand your question.

Is your code running on the server, or on a client?

Are you accessing these files via a filesystem (like a C:\ prompt?), or FTP, or HTTP?

Right now, it sounds like you're trying to vacuum up a site's contents via a URL to the root page.

Chip H.
 
Function PathFromURL(iURL As String) As String
Dim I As Integer
Dim Last As Integer
Dim C As String * 1
Thanks Chip for your respose, but we figured it out with the help of microsofts code. This takes your current location and drops off the end so you can then use the viriable to send it to other htm's at the same location. I am posting it on here so that it may help someone else. Thanks again for your response.


mainURL = PathFromURL(Parent.LocationURL)


For I = Len(iURL) To 1 Step -1
C = Mid$(iURL, I, 1)
If C = "\" Or C = "/" Then
Last = I
Exit For
End If
Next
If Last > 0 Then
PathFromURL = Left$(iURL, Last)
Else
PathFromURL = ""
End If

End Function
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top