In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/02 Report--
How do I map a local folder to a hard drive letter?
©Lander Zhang focuses on on-demand IT infrastructure operation and maintenance services for foreign enterprises, and IT Helpdesk hands-on training practitioners
Https://blog.51cto.com/lander
2018-11-07 7:50
Problem description
Almost all the customers we serve are using Office 365, and many customers are used to using OneDriver to store data. This OneDriver can be understood as a Microsoft cloud disk and one of the components of Office 365. it is very convenient to achieve multi-screen data unification on office computers, mobile phone clients or your own computers.
OneDriver is installed and configured by default, and it creates a folder locally where users can store files or folders. Although it is very convenient, there are still some users who are not used to the principle of D disk E disk into a folder, so they hope that this OneDriver folder can become a hard drive letter, so they are very used to putting data in this hard disk partition.
Analysis of problems
It is not difficult to map a shared folder to a hard drive letter, but when users need to map a local folder to a hard drive letter, it is not possible to remap their personal data through sharing. By default, the path to create OneDriver is C:\ Users\ Lander Zhang\ OneDrive-XXX, under the user profile:
I do not recommend changing it to a non-user configuration folder (for example, under the root directory of disk C), because there may be multiple users logging on to the same computer in the domain environment, and there are default access restrictions between different users under the user configuration folder, which can effectively achieve information security. Therefore, in addition to realizing the mapping of folders to hard drive letters, we also need to solve the problem of user profile variables, that is, different users logging in will automatically realize the mapping of OneDriver hard drive letters.
To solve the user profile variables, we need to know the common system variables of Windows. For the folder to be mapped to the hard drive letter, we can use the subst command.
Solution method
1. Set the Windows system variable
Lander Zhang in C:\ Users\ Lander Zhang\ OneDrive-XXX is a system variable, that is, different users login to the system will use the corresponding user configuration information, the system will automatically identify according to this variable, regardless of which partition the system is installed in, where the user's configuration files are saved, and what is the name of the user's configuration folder, for example, Angel Wang logged on to this computer. The OneDriver folder is C:\ Users\ Angel Wang\ OneDrive-XXX.
The system variable needed this time is to know the location of the OneDrive-XXX folder under the current login user configuration folder. Someone's user profile is created and named under the user login name, so we can use the system variable% USERNAME%.
two。 Map a folder to a hard drive letter
Need to map the local folder OneDriver, to remember, set the hard drive letter to O disk. Create a new text file named "Mapping_ODriver" and edit-enter: "C:\ Users\% USERNAME%\ OneDrive-XXXX", (the XXXX after the OneDriver is different for different companies, note-there is a space before and after it; double quotation marks are under the English input method):
Save after editing and modify the suffix to .bat:
Double-click to run Mapping_ODriver.bat to map the OneDrive-XXXX folder under the current user configuration folder to O disk, which is the same size as the hard disk partition where the source folder resides:
To disconnect, simply enter the command: subst O: / D.
For practical convenience, you can also make a .bat file. Just double-click and run it when you need it:
Experience summary
If all users need this feature, it is recommended to use group policy. We can also place the Mapping_ODriver.bat in the startup folder of the public user to automatically perform automatic mapping after the user logs in.
If the document is useful to you, please forward it and share it!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.