|
Description The EnumNetworkDrives method creates a array containing the drive letter and network path for the locally mapped drives.
object.EnumNetworkDrive
Returns a collection containing the drive letters and network paths coupled in sequential pairs. For example, the first item is the drive letter of the first mapping, the second item is the network path of the first mapping, the third item is the drive letter of the second mapping and so on.
Example
'VBScript Example Set WshNetwork = WScript.CreateObject("WScript.Network") Set Drives = WshNetwork.EnumNetworkDrives
For i = 0 to Drives.Count - 1 Step 2 WScript.Echo Drives.Item(i), Drives.Item(i+1) Next
See Also WScript.Network Object, MapNetworkDrive Method, RemoveNetworkDrive Method
|