[thelist] Directory Listing
Hoenig, Robert
rhoenig at gilmanassembly.com
Wed Jun 20 10:34:46 CDT 2001
I'm trying to create a page that will pull folders out of a directory and
list them on a page. The Folder I'm pulling from is on a separate server
than the web server. Here is the code I'm trying to use but it's not
returning anything. The folder is shared.
foldername = \\servername\foldername
Dim objFSO 'FileSystemObject variable
Dim objFolder 'Folder variable
Dim objItem 'Variable used to loop through the contents of the
folder
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder(Server.MapPath(foldername))
Response.Write("<br>Contents of: " & objFolder)
For Each objItem in objFolder.SubFolders
Response.Write(objItem.Name )
Next
Any help would be appreciated.
Robert
More information about the thelist
mailing list