Discussion Locked

asp virtual directory problem

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Unable to access directory tree information from a remote share on WIndows 2000.
I'm unable to access data placed in a virtual directory on a web server that's setup to access information on a shared drive. I have an asp script that uses server.mappath. I keep getting an error path not found.

4 replies

by alterego2

Permissions error maybe? If the resource is on another server then it may be the case that its a trust issue over the domain.

Why dont you post some code and give a little more details.

by weaver6d

here's the .asp code you requested:
<%
newpath = request.querystring("newpath")

' The following line is the only variable you need to change.
' MyFolder is the directory where parsing starts.
' To test this create a folder off of the root of your ASP enabled web site
' Put some sub folders and files in it and fire up this script in your browser
' Avoid using the characters like !@#$%^&*()+=

MyFolder = "\\server\folder"
folderspec = MyFolder & "/"

if newpath<>"" then
folderspec = folderspec & newpath & "/"
end if
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set folder = oFSO.GetFolder(server.mappath(folderspec))
Set subfolder = folder.subfolders
ShowPageHead = MyFolder & " Folders"
If newpath<>"" then
Pointer = instrrev(newpath,"/")
If Pointer>0 then
UpOneLevel = Left(newpath,Pointer-1)
ShowHead = ShowHead & "Up One Folder
"
Else
ShowHead = ShowHead & "Up One Folder

"
End If
End If
For Each newfolder in subfolder

If Instr(newfolder.name,"_") Then
Else
ShowFolders = ShowFolders & "" & newfolder.name & "

"
End If
Next
ShowCurrentFolders = "" & folder.name & ""
%>

<%=ShowHead%> <%=ShowFolders%> <%
Response.Write ShowCurrentFolders & "

"
Set filelist = folder.files
For Each file in filelist

If Instr(file.name,"_") or Instr(file.name,".asp") Then
Else
response.write "

by alterego2

One more piece of info please.

Can you do a send the .tostring value of

1) folderSpec
2) server.mappath(folderspec)

by alterego2

One more piece of info please.

Can you post the .tostring value of

1) folderSpec
2) server.mappath(folderspec)

This discussion is closed to new replies.