Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Filesystem Object question


Message #1 by "Ryan vd Merwe" <ryan@w...> on Fri, 29 Mar 2002 15:50:49
Hi
How do change the following code to browse the contents of a different 
folder instead of the folder this file is in?


<table>
<%

strPathInfo=Request.ServerVariables("SCRIPT_NAME")
strPhysicalPath = Server.MapPath (strPathInfo)
		
set objFSO = CreateObject("Scripting.FileSystemObject")
		
set objFile = objFSO.GetFile(strPhysicalPath)
Set objFolder = objFile.ParentFolder
Set objFolderContents = objFolder.files
		
		
for each objFileItem in objFolderContents
		
		
%>
		
	<tr>
		<td><li></td>
		
		<td><%Response.Write "<a href=" & objFileItem.Name & " 
target=parent>" & objFileItem.Name & "</a>"%></td>
	</tr>
<%next	%>
</table>

  Return to Index