@echo off
:: Disconnect Mapped Network Drive Tool
:: Written 1998 by Casey Sprangel
:: Change to local drive before we remove network maps
C:
:: Tell user what we are doing
echo Removing all mapped network drives... [E through Z]
:: Walk through all drive letters E through Z and disconnect.
:: This will pause for user input if there is a problem. Do not redirect!
for %%i in (e f g h i j k l m n o p q r s t u v w x y z) do net use %%i: /delete
:: If this is in a DOS window, the following command will close the window
EXIT