I have mapped a drive from a network. Once the command is successful, it will appear on My Computer windows explorer together with the path of the network. Now, I want to rename the mapped drive by using command prompt. Is it possible? I have used ren "full path name of the folder" "new name of the folder" command, and it works perfectly. but when I use it to rename the drive, it will not work.
So I would create a small VBScript script, which takes the drive letter as one parameter, and the new label as the second. My VBScript is rusty, but according to this Stack Overflow question, something like this:
If you call that rename_drive.vbs, you can execute it as
Of course, if you're comfortable creating COM objects from Java, you can do that directly.