WshNetwork.EnumNetworkDrives

The EnumNetworkDrives method returns the current network drive mappings as a WshCollection object. Items in this collection are local names and remote names.

Syntax

WshNetwork.EnumNetworkDrive = objWshCollection
 

Example

Set WshNetwork = Wscript.CreateObject("Wscript.Network")

Set oDrives = WshNetwork.EnumNetworkDrives

Wscript.Echo oDrives.Item(0) = "Z:"
Wscript.Echo oDrives.Item(1) = "\\Server\Share"

See Also

WshNetwork.MapNetworkDrive method, WshNetwork.RemoveNetworkDrive method, WshCollection object