Server.Mappath Help

Y

Y2K

I have a thumbnail viewer which displays images on a webpage.
Currently, the images reside in a subfolder of the root, and this works
fine. I understand the main problem here is my limited knowlege of
ASP.

Here's the current setup:
c:\testproj\imageviewer = Virtual directory named "IMGviewer"
c:\testproj\imageview\upload\pics = folder that contains images


The following code works:
ImageConn = "pics/"
Set fso = CreateObject("Scripting.FileSystemObject")
'Set fattributes = fso.GetFolder(server.mappath(""&ImageConn&""))


The problem is, the images are in another folder:
c:\testfolder\myimages\pics_5


I've tried the following, and get a "path not found" error.
Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5\")
Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5")
Set fattributes =
fso.GetFolder("//servername/c$/testfolder/myimages/pics_5")
Set fattributes =
fso.GetFolder("//servername/c$/testfolder/myimages/pics_5/")


Can anyone tell me what I'm doing wrong? Thanks.


Y2K
 
J

Jeff Cochran

I have a thumbnail viewer which displays images on a webpage.
Currently, the images reside in a subfolder of the root, and this works
fine. I understand the main problem here is my limited knowlege of
ASP.

Here's the current setup:
c:\testproj\imageviewer = Virtual directory named "IMGviewer"
c:\testproj\imageview\upload\pics = folder that contains images


The following code works:
ImageConn = "pics/"
Set fso = CreateObject("Scripting.FileSystemObject")
'Set fattributes = fso.GetFolder(server.mappath(""&ImageConn&""))


The problem is, the images are in another folder:
c:\testfolder\myimages\pics_5


I've tried the following, and get a "path not found" error.
Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5\")
Set fattributes = fso.GetFolder("c:\testfolder\myimages\pics_5")
Set fattributes =
fso.GetFolder("//servername/c$/testfolder/myimages/pics_5")
Set fattributes =
fso.GetFolder("//servername/c$/testfolder/myimages/pics_5/")


Can anyone tell me what I'm doing wrong?

Trying to access a folder with an incorrect path. :)

Most likely the folder in question doesn't have permission for the
account accessing it.

Jeff
 
Y

Y2K

Jeff Cochran said:
Trying to access a folder with an incorrect path. :)

Most likely the folder in question doesn't have permission for the
account accessing it.

Jeff

Ok.. not having permissions is fine.. I can fix that. What's the correct
path? Are you saying I'm getting that error because the path cannot be found
due to insufficient permissions?

Y2k
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top