Here is your solution:

Obtain the WSHPIPE UDF from the "UDF Collection" (link below) and use this script.
code:
for each $line in WshPipe("net use",1)
if left($line, 2) = "OK"
$drive = substr($line, 14, 2)
$path = substr($line, 24)
$path = left($path, instr($path, " ")-1)
if $drive <> "Z:"
;use $drive $path /del /persistent
? "use $drive $path /del /persistent"
endif
endif
next

{edit} forgot the if z:

[ 21. November 2002, 14:41: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/