Display Network Files?

Results 1 to 2 of 2

Thread: Display Network Files?

  1. #1
    Join Date
    Dec 1969

    Default Display Network Files?

    Trying to display contents of a folder that I am mapped to. For instance, Drive "I" on my machine is mapped to a server at my location. However, I get "Path not found" when I try to run the page. (I know the path exists). Here is the code behind the page:<BR>&#060;%<BR>dim fs, objFolder,objFolderContents<BR>strPathInfo="I:Sets "<BR><BR>Set fs=CreateObject("Scripting.FileSystemObject")<BR>S et objFolder=fs.GetFolder(strPathInfo)<BR>Set objFolderContents = objFolder.Files<BR>%&#062;<BR>&#060;HTML&#062;<BR> &#060;HEAD&#062;<BR>&#060;/HEAD&#062;<BR>&#060;BODY&#062;<BR>&#060;%<BR>For Each file in objFolderContents<BR>Response.Write file.name &"<BR>"<BR>Next<BR><BR>Set fs=Nothing<BR>Set objFolder=Nothing<BR>Set objFolderContents=Nothing<BR>%&#062;<BR>&#060;/BODY&#062;<BR>&#060;/HTML&#062;<BR><BR>ANy help would be appreciated.

  2. #2
    Join Date
    Dec 1969

    Default RE: Display Network Files?

    The reason is that the server runs under a different user account than you do. If you want to read a remote directory, you have a couple of choices. If the server is running under a domain account, you can use the UNC path instead of your mapped driver letter. FSO will allow UNC paths, IF your server user has the right to read that directory. If you are the admin, this should not present a problem, if not, you will need to get in touch with the admin and tell him/her/it what you are trying to accomplish. If you need further assistance, you can contact me @ contracting-questions@n-hancing.com

Posting Permissions

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