how to read a map drive via asp
Hi,
I am building an application in which i want to read a map drive of web server and extract some files from that drive :
currently i am using the script below :
Code:
Dim WshNetwork, oDrives, i
dim drivemapper
'-- Setting objects --
Set objNetwork = CreateObject("Wscript.Network")
Set oDrives = objNetwork.EnumNetworkDrives
'Example:
Drive = "Z:"
Share = "\\drivewav\wav$\"
objNetwork.MapNetworkDrive Drive, Share
sDir = "Z:"
Response.write "Computer Name: " & ObjNetwork.ComputerName & "<br>"
Response.write "User Domain: " & ObjNetwork.UserDomain & "<br>"
Response.write "User Name: " & ObjNetwork.UserName & "<br>"
Set objFolder = ObjFSO.GetFolder(sDir)
Set colFiles = objFolder.Files
For Each objFile in colFiles
Response.write objFile.Name'
Response.write "<br>"
Next
Response.Write("path: " & Server.MapPath("\\drivewav\wav$\"))
objNetwork.RemoveNetworkDrive Drive, true, true
I am getting an error below :
Quote:
WSHNetwork.MapNetworkDrive error '80070035'
The network path was not found.
but the path is available i can browse it physically could any one suggest what is the issue with it.