View Full Version : How do I find an open drive letter
mike
January 9th 04, 09:59 PM
I'm writting a DOS script for W2K and XP. I need to build
a routine which can find an open drive letter which I can
map to. Any suggestion on the best way to do this?
thanks
mike
Ron Lowe
January 9th 04, 10:01 PM
"mike" > wrote in message
...
> I'm writting a DOS script for W2K and XP. I need to build
> a routine which can find an open drive letter which I can
> map to. Any suggestion on the best way to do this?
>
> thanks
>
> mike
How about just mapping to the next available drive letter, using the '*'
option:
net use * \\homenetdc01\download\microsoft
Drive X: is now connected to \\homenetdc01\download\microsoft.
The command completed successfully.
You'd need to parse the output of the command to determine which drive
letter it's chosen.
--
Best Regards,
Ron Lowe
MS-MVP Windows Networking
mike
January 9th 04, 10:01 PM
Thank you Ron. I'll give that a shot.
thanks
mike
>-----Original Message-----
>"mike" > wrote in message
...
>> I'm writting a DOS script for W2K and XP. I need to
build
>> a routine which can find an open drive letter which I
can
>> map to. Any suggestion on the best way to do this?
>>
>> thanks
>>
>> mike
>
>
>How about just mapping to the next available drive
letter, using the '*'
>option:
>
> net use * \\homenetdc01\download\microsoft
>
> Drive X: is now connected to \\homenetdc01
\download\microsoft.
>
> The command completed successfully.
>
>You'd need to parse the output of the command to
determine which drive
>letter it's chosen.
>
>--
>Best Regards,
>Ron Lowe
>MS-MVP Windows Networking
>
>
>.
>
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.