Microsoft® Windows® Script Host
EnumNetworkDrives Method
WSH Reference
Version 1

See Also                      Applies To


Description
Returns the current network drive mappings.
Syntax
objDrives = object.EnumNetworkDrive
Parameters
Part Description
object WshNetwork object.
objDrives Variable reference to the collection of drives.
Remarks
Items in this collection are local names and remote names. The first item in the collection is the drive letter and the second item is the network mapping. This pattern continues for all the network drives in the collection.
Example
The following example outputs the drive letters and network mappings:

Set WshNetwork = WScript.CreateObject("WScript.Network")
Set oDrives = WshNetwork.EnumNetworkDrives
For i = 0 to oDrives.Count -1
	WScript.Echo oDrives.Item(i)
Next