| focused 2001-12-03, 11:45 am |
| yes it's possible to access files in a folder on the server without http: ref.
First, you'll need to know the path to the file (On the web server itself)
Try this,
'OPEN ACCESS TO THE FILE SYSTEM
Set objFSO=Server.CreateObject("Scripting.FileSystemObject")
Foldername = WebLoc & ToolFileLoc & "Info And Resources"
foldername=Path to the folder where the files will be placed e.g On the server- \\severname\driveletter\folder
\
If objFSO.FolderExists(Foldername) Then
flgFolderExists = True
Set objFolders=objFSO.GetFolder(Foldername)
strFolderName="Info And Resources"
Else
Response.Write("The folder " & Foldername & " does not exist")
flgFolderExists = False
End If
Then in the body or a sub
If flgFolderExists = True Then
If objFolders<>"" Then
For Each objFiles In objFolders.Files
<a href="<%=Webserver file syntax - eg http:www.//testserver/%><%=strFoldername%>/<%=objFiles.Name%>"><%=objFiles.Name%></a>
And anything you want
Next
Else
Response.Write("<font class=AlertText> Sorry, No information exists at this time.</font>")
End If
Else
Response.Write("<font class=alerttext>Sorry, This folder is not available at this time.</font>")
End If
I hope this helps in any way. If it doesn't sorry for wasting your time |