Results 1 to 2 of 2

Thread: using fso across servers

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Aug 2002
    Location
    Norwich, UK
    Posts
    405

    Smile using fso across servers

    I have an asp app that returns file info from files on a server

    the site is on server1, the files are on server2

    But i'm getting an error of "path not found"

    the path is set here somewhere else in the code

    ThePath = "\\server2\images\" & SubscriberCode

    the app errors on the

    set dbFolder = fso.Getfolder(ThePath

    i'm assuming its cos i'm using a unc. can anyone shed any light on this?

    Public Function GetFileFunction(ThePath)
    dim dbJustThePath
    dim dbJustTheFile
    dim fso
    dim fileString
    dim imageTypeCount
    imageTypeCount = 1

    set fso = server.CreateObject("scripting.FileSystemObject")

    'set folder object to equal the path str
    Set dbFolder = fso.GetFolder(ThePath)

    'set file object to equal the files contained in the folder object
    Set dbFiles = dbFolder.Files

    'iterate through files in folder adding all .mdb's to listbox
    response.write "<center><table border><tr class='header'>"
    Response.write "<th>File Name</th>"
    Response.write "<th>Date Created</th></tr>"
    For Each dbFile In dbFiles
    response.write ("<td>" & dbFile.Name & "</td>")
    response.write ("<td>" & dbFile.DateCreated & "</td></tr>")
    Next
    response.write "</table></center>"
    end Function

  2. #2
    Frenzied Member Memnoch1207's Avatar
    Join Date
    Feb 2002
    Location
    DUH, Guess...Hint: It's really hot!
    Posts
    1,861
    Being educated does not make you intelligent.

    Need a weekend getaway??? Come Visit

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