Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using EnumNetworkDrives to list out all the drives on a machine. I'd like to determine which object in the collection is drive "X"

What object is returned in EnumNetworkDrives that has a property I can compare to a drive letter?

share|improve this question
up vote 2 down vote accepted

The EnumNetworkDrives method returns a collection. This collection is an array that associates pairs of items — network drive local names and their associated UNC names. Even-numbered items in the collection represent local names of logical drives. Odd-numbered items represent the associated UNC share names. The first item in the collection is at index zero (0).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.