Automatically modify the disk volume name script after you use a batch network map drive _dos/bat

Source: Internet
Author: User
For example, the server master D:\data map to the local Disk Z disk, which is stored in various departments of the folder, these folders have set the corresponding permissions to ensure data security. Then the user can see a network disk on my Computer: data (Z:) on ' master ' is similar to such a long volume name.

There is nothing wrong with this label name, just lack of practical meaning, users can not at a glance. So we need to change the volume name of this network drive map, just right-click on it to rename it. However, if it is a lot of users, especially in the case of domain management, a change of this workload is very large. So now I'm going to share a batch script with you.
Copy Code code as follows:

NET use Z: \\master\data/savecred
REG ADD hkcu\software\microsoft\windows\currentversion\explorer\mountpoints2\# #master #data/v _labelfromreg/d " File Server "/F
NET use Y: \\server\share\ fax/savecred
REG ADD hkcu\software\microsoft\windows\currentversion\explorer\mountpoints2\# #server #share# Fax/v _labelfromreg/d " Fax Server "/F

Simple description: The example above is the shared folder data in the file server master in the mapping domain, and the volume label is called a file server; The second mapping is to map the shared folder share\ Fax under Server server, and change the label to the fax server.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.