Microsoft
Software
Hardware
Network
Question : delete a specific network mapped drive with a bat file.
I have a mapped drive M:\\xxx\xxx which needs to be deleted from all users on the network however, i have the M drive letter mapped to a different share on 2 different machines that I don't want deleted. Is there a way to have the bat files delete a specific mapping without upsetting the good mapping?
I want to lose m:\macfiles\macshare but not M:\\hciwhseprt\commondata (this is only specific on 4 machine and needs to stay because it's hard coded in a file.
I'm using this in a bat file in a domain login script via group policy
Answer : delete a specific network mapped drive with a bat file.
You can reverse the findstr logic to search for the "good" shares and if they exist do nothing, otherwise delete the M: mapping.
BTW. the syntax to delete the M: drive should be:
net use m: /d
without the path.
1: 2:
net use | findstr hciwhseprt if errorlevel 1 net use m: \\hciwhseprt\commondata
Open in New Window
Select All
Random Solutions
Trying to import media to restore system state using ntbackup
PayPal DirectPayment ASP.Net vs classic ASP
How do I update the network card drivers on a Symantec Ghost 11 boot disk?
replace function in sybase 5.5
Postfix how to resend status=deferred mail
Recover Outlook 2007 (Exchange 2007) Calendar Categories
Cannot find a couple of drivers for IBM THINKPAD R40
Can't connect to exchange 2007 across IPSec
Vista PaperPort Installation Errors
Fresh reinstall of Windows XP - not getting internet connection - what's wrong?