I think what the user is asking is:
"assume I have Z: mounted to something, either a UNC share, WebDAV share, or
local partition", how do I remove Z: from the mapping [so that I can use it
for something else]"
To remove a UNC or WebDAV share, use:
NET USE Z: /d
To remove a Z: mapping to a local partition:
- On W2K, use:
mountvol Z: /d
- On WXP/WS03, use DISKPART:
diskpart
list volume
select volume # (find the volume # corresponding to the drive letter in
interest)
remove
--
//David
IIS
http://blogs.msdn.com/David.Wang
This posting is provided "AS IS" with no warranties, and confers no rights.
//
Don I said:
If you mean the prompt shown in the cmd window, it's a variable called
"PROMPT". By default it's set to $p$g which results in showing the full
path to the current location with the greater than symbol. But I don't see
anyway to get rid of the drive letter.
If you're wanting to find out the drive letter that is passed to a batch
file at the command line then that's a different story. And although I'm
sure it can be done, I don't have time right now to get to it. If I find
time later, I'll see what I can come up with.
No need:
X:\bats\batfile.bat Z:\data\info\stuff.txt
in batfile.bat:
echo/drive where batch file is located: "%~d0"
echo/drive where data file is located: "%~d1"
/Al