Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

%_DRIVE(EX) - expansion

rconn

Administrator
May
13,063
194
Staff member
%_DRIVE(EX) - expansion

I use the following alias to disconnect all network drives:

for %f in (%_drives) do if %@drivetype[%f] eq 4 net use %f /d

But mapped, but unavailable drives are not included in this list, perhaps by design.

The problem is that network drives that are mapped, but unavailable is not included in the list returned by %_DRIVE.

I am not sure if this is by design.

Since I noticed two functions, %@DRIVE + %@DRIVEEX, I ask for the following:

%_DRIVE to include all letters shown by NET USE command
%_DRIVEEX to do it, and %_DRIVE to remain unchanged.

The "unavailable drives" returned by NET USE are J: and L: - those are not included in the %_DRIVE list, but K: is included.

Sample NET USE status:

New connections will be remembered.

Status Local Remote Network

-------------------------------------------------------------------------------
Unavailable J: \\192.168.47.1\AiDisk_b1 Microsoft Windows Network
OK K: \\im04\c$ Microsoft Windows Network
Unavailable L: \\auto02\d$ Microsoft Windows Network

eb05fd5b829b00f7037d246232a92cee
Stein Oiestad on November 10, 2012 00:37
 
Back
Top