Results 1 to 3 of 3

Thread: FileSystemObject and UNC

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422

    Question 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
    Last edited by DaveBo; Sep 15th, 2004 at 07:56 AM.
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

  2. #2
    Big D Danial's Avatar
    Join Date
    Jul 2000
    Location
    ASP.Net Forum
    Posts
    2,877
    You should use

    Response.write Server.MapPath("FileOrFolderName")

    That will give you the full physical path of the file/folder.
    [VBF RSS Feed]

    There is a great war coming. Are you sure you are on the right side? Atleast I have chosen a side.

    If I have been helpful, Please Rate my Post. Thanks.

    This post was powered by :

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2001
    Location
    N42 29.340 W71 53.215
    Posts
    422
    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.
    "The wise man doesn't know all the answers, but he knows where to find them."
    VBForums is one place, but for the really important stuff ... here's a clue 1Tim3:15

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width