With the introduction of Windows 11, OneDrive has become a more permanent part of the OS, where the OneDrive files are shown directly in the Start Menu. But, Microsoft has pushed a recent update for Windows that makes it harder to map OneDrive to a particular drive letter on your system. Don’t worry. There are multiple ways that you can still use to map the OneDrive to a designated drive letter on your system.
How to map OneDrive to a drive letter in Windows 11
Just follow these steps to assign a drive letter to OneDrive on your system.
Step 1 – Determining the path of the One Drive
At first, you have to know the exact path of the OneDrive folder. There are two ways you can do it. We have explained both and you may follow any of these ways.
Way 1 – Using the File Explorer
1. At first, press the Windows key+E keys together to open the File Explorer.
2. Then, go this way –
Local Disk (C:)\Users
3. Here, you will find various user folders.
4. Now, double-click on the folder with your user name.
[Like in my case, it is “sambi“. ]
5. Inside your user folder, locate the “OneDrive” folder inside.
6. Then, double tap on the “OneDrive” folder to access it.
7. Once you are in the OneDrive folder, just tap on the address bar to select the address at once. Then, press the Ctrl+C keys together to copy it.
In our case the location is –
After that, close the File Explorer.
Way 2 – Using the Command Prompt
If you can’t find the OneDrive in the File Explorer, you can locate using the Command Prompt.
1. At first, type “cmd” in the search box.
2. Then, right-click on the “Command Prompt” and tap on “Run as administrator” to access the terminal as an administrator.
3. Now, type these two commands one at a time and hit Enter to list the contents of the C: drive.
4. Now, again execute these codes to list the folders of the Users drive.
cd Users dir
Carefully note the user folder present in the list.
5. Now, navigate to your user account using these commands.
cd username dir
Replace the “username” with the username folder that you noted in the list.
Example – The username we are using is “sambi“. In our case, the command is –
6. Inside your account folder list, you will find one or multiple “OneDrive” folders.
Carefully notice the name of the OneDrive folder that you are trying to map.
It is generally –
C:\Users\your username\name of the OneDrive folder from the list
In our case, the full address of the OneDrive folder will be –
7. Once you are done, copy-paste, modify the command, and hit Enter.
subst drive letter " full address of the OneDrive folder"
Just replace the “drive letter” with the drive letter you want to assign to the newly mapped OneDrive.
Then, put the full address of the OneDrive folder in the place of “full address of the OneDrive folder“. Remember to put the address of the folder between the quotation marks in the command.
Example – We want to map the OneDrive folder to “p:” drive letter. So, the code will be –
subst p: "C:\Users\sambi\OneDrive"
That’s it! Now, you can close the Command Prompt and check the File Explorer.
You will see the OneDrive has appeared as the P: drive on your system.
If the above method doesn’t work, you can add OneDrive as a network drive on your system. It will work as well.
Step 1 – Record the CID number
You have to know the CID number by accessing the OneDrive in a browser window.
1. At first, open the OneDrive on your system. Use your OneDrive credentials to log in.
2. Once you have logged in, go to the address bar. At the end of the address, you will notice a CID number (the number after the phrase “cid=” at the last part of the address.)
Note down the CID number.
Now, you can close the browser window.
STEP 2 – Map network drive
1. Open the File Explorer on your system.
2. In the File Explorer window, tap on the three-dot and again click on “Map network drive” to map OneDrive.
3. Then, paste this line in the “Folder:” box and modify this line accordingly.
Replace the “CIDNumber” with the CID number of OneDrive that you have noted in the address bar.
4. Now, tap on “Finish“.
Next, Windows will try to connect to the OneDrive as a network drive.
5. Now, input your OneDrive credentials once again in the “User” and “Password” boxes.
6. Make sure to check the “Remember my credentials” box.
7. Finally, tap on “OK“.
OneDrive will be opened in a new File Explorer window. You have successfully mapped OneDrive as a drive on your system.
Optional Steps –
As you have added OneDrive as a new network drive, it may bear a long address in its name. You can easily rename it back to “OneDrive” (or anything you prefer) following these steps.
1. At first, open the File Explorer.
2. On the right-hand side tap on the new OneDrive that you have added as a network drive and click on “Rename” to rename it.
Now, name it to anything you prefer.