p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_discuss thread: Accessing LAN drive files


Message #1 by robert_segarra@h... on Tue, 16 Oct 2001 22:55:32
I am trying to access a LAN drive using FileSystemObject. GetFolder 

method. I want to go into a folder, do a look up of the files and then 

display the contents of the folder in a browser using asp. sVariableFolder 

depends on the user logged in. The code I am using is something like this,



On Error Resume Next

g_oUserFolder = "\\195.228.170.29\folder1\folder2\folder3\" & 

sVariableFolder



Set g_oFso = Server.CreateObject("Scripting.FileSystemObject")

   

Set oFolder = g_oFso.GetFolder(g_oUserFolder)

		

Set colFile = oFolder.Files

   

For Each oFile in colFile

   	

Set objFile = g_oFso.GetFile(oFile)



etc.



I get and error saying path not found, however according to literature you 

can use a path (absolute or relative) to a specific folder.



Please help.



Robert

  Return to Index