This behaviour is for historic reasons*). Both command.com and cmd.exe keep a current directory for every drive (I guess it's the underlying DOS emulation that does so). But I don't see the problem anyway, just always use drive:/ to remove any ambiguity. If your user specifies stuff like h:, they most likely mean what you will get when you call opendir( "h:" );.
*) The link is courtesy of the master of links, tillyIn reply to Re: Problem with opendir/readdir on Win2k
by Corion
in thread Problem with opendir/readdir on Win2k
by Rudif
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |