J
jwgoerlich
I am writing a cmd batch job wherein I must check to see where a drive
letter is mapped and then perform some action. I am thinking that the
simplest method would be to pipe Net Use and then parse the input.
For example,
:\ Net Use K:
Local name K:
Remote name \\server\share
Resource type Disk
Status OK
# Opens 20
# Connections 1
The command completed successfully.
What I would like to do is something like the following pseudo code:
If "Net Use K:" Contains "\\server\share" Then Goto Subroutine
How can I code this in batch for a Win2000 computer?
Thanks in advance,
J Wolfgang Goerlich
letter is mapped and then perform some action. I am thinking that the
simplest method would be to pipe Net Use and then parse the input.
For example,
:\ Net Use K:
Local name K:
Remote name \\server\share
Resource type Disk
Status OK
# Opens 20
# Connections 1
The command completed successfully.
What I would like to do is something like the following pseudo code:
If "Net Use K:" Contains "\\server\share" Then Goto Subroutine
How can I code this in batch for a Win2000 computer?
Thanks in advance,
J Wolfgang Goerlich