-
FileSystemObject and UNC
Is it possible to get the names of files in a folder using the FSO and a UNC within an ASP?
e.g.
Set objFileSys = Server.CreateObject("Scripting.FileSystemObject")
Set Fldrs = objFileSys.GetFolder("\\fileserver\temp\")
and then loop through the file names there.
The files there are all VBScripts (.vbs) and I want to dynamically build up a page of hypertext links to those so that simply adding a new .vbs file will let it show up on the links page.
Thanks, DaveBo
-
You should use
Response.write Server.MapPath("FileOrFolderName")
That will give you the full physical path of the file/folder.
-
I'm trying to get a list of the files in a folder at a UNC path.
When I tried using a UNC in the Server.MapPath I got the following error msg:
Server.MapPath(), ASP 0174 (0x80004005)
An invalid '/' or '\' was found in the Path parameter for the MapPath method.