Sync D Drive to OneDrive: Simple Step‑by‑Step Guide
In this article
Yes, you can sync your D: drive with OneDrive by creating a folder on D and linking it into the OneDrive folder using a Windows symbolic link, which makes OneDrive treat the external folder as if it were inside its own directory.
What You’ll Need
- Windows 10 or Windows 11 with the OneDrive desktop client installed and signed in
- Administrator rights to run Command Prompt for creating symbolic links
- Enough OneDrive storage space for the files you plan to sync
- A stable internet connection for the initial upload
Step‑By‑Step
- Confirm OneDrive is active. Look for the white or blue cloud icon in the task‑bar notification area. If it’s not running, open the Start menu, type OneDrive, and launch the app. Sign in with your Microsoft account if prompted.
- Decide which folder on D you want to keep in sync. For this guide we’ll use
D:\MyDocs. Create the folder if it does not already exist (right‑click on D: → New → Folder). - Create a placeholder folder inside the OneDrive directory. Open File Explorer, navigate to
C:\Users\YourUserName\OneDrive, and create a new folder named something likeD‑Drive‑Backup. This folder will hold the symbolic link. - Open an elevated Command Prompt. Press Windows+X and choose “Windows Terminal (Admin)” or “Command Prompt (Admin)”. Accept any UAC prompt.
- Run the mklink command. Type the following line, replacing YourUserName with your actual Windows username and adjusting folder names if you chose different ones:
mklink /D "C:\Users\YourUserName\OneDrive\D‑Drive‑Backup" "D:\MyDocs"
Press Enter. The command creates a directory symbolic link (the/Dflag) that points from the OneDrive folder to the D: folder. - Verify the link. In File Explorer, the
D‑Drive‑Backupfolder will now display a shortcut overlay. Double‑click it; you should see the contents ofD:\MyDocs. No files are copied – the link only references the original location. - Allow OneDrive to start syncing. The OneDrive client will detect the new folder and begin uploading its contents. You can watch progress by clicking the cloud icon and selecting “View sync problems” or “Open folder”.
- Optional: Adjust selective sync. If you do not want every sub‑folder to sync to all devices, right‑click the OneDrive cloud icon → Settings → Account → Choose folders. Uncheck any sub‑folders you prefer to keep local only.
- Test the setup. Add a new file to
D:\MyDocs. Within a few minutes (or after a manual sync via the cloud icon → “Sync now”), the file should appear in the OneDrive web view at onedrive.live.com. Deleting the file from D: should also remove it from OneDrive after the next sync cycle.
Common Mistakes
- Creating a hard link or copying the folder instead of a symbolic link. Hard links only work for individual files and will not make OneDrive see the whole folder.
- Running
mklinkwithout administrator rights, which results in “Access is denied”. Always open the command prompt as admin. - Placing the link inside a OneDrive folder that is already excluded via selective sync. The client will ignore the link and no files will upload.
- Syncing more data than your OneDrive plan allows. The client will stop with a “Not enough storage” error, and the link will appear disconnected.
- Moving or renaming the original D: folder after the link is created. The link becomes broken and OneDrive will report “File not found”.
Tips
- Use short, descriptive folder names for the link (e.g.,
D‑Photos) to avoid path‑length issues on older Windows versions. - Pause OneDrive sync while copying a large number of files into the D: folder, then resume to prevent throttling or temporary errors.
- Regularly check the OneDrive storage usage page (cloud icon → Settings → Manage storage) to avoid unexpected quota overruns.
- If you have a solid‑state drive on C: and a larger HDD on D:, linking large media libraries to OneDrive keeps them backed up without filling the faster SSD.
- For Windows 11, you can also create the link via PowerShell:
New-Item -ItemType SymbolicLink -Path "$env:USERPROFILE\OneDrive\D‑Drive‑Backup" -Target "D:\MyDocs"
Troubleshooting
OneDrive shows “Sync paused” or “Not syncing”. First, click the cloud icon and choose “Resume syncing”. If that fails, sign out (cloud icon → Settings → Account → Unlink this PC) and sign back in.
The linked folder appears with a red X. This usually means the link is broken. Verify the original D: folder still exists at the exact path used in the mklink command. Re‑run the command if the path changed.
Files are not uploading and the OneDrive icon stays static. Check for Windows updates and OneDrive client updates (Settings → About → Version). Restart the computer, then open Task Manager and ensure the “Microsoft OneDrive” process is running.
High CPU or network usage after creating the link. OneDrive may be indexing a large number of files. Let it finish the initial scan; you can temporarily limit bandwidth in Settings → Network → Upload rate.
Sync conflicts appear (two versions of the same file). This happens when the same file is edited on another device before the OneDrive client finishes uploading. Resolve conflicts by opening the “conflict” copies and merging changes, then delete the duplicates.
If none of the above works, consider removing the symbolic link (delete the D‑Drive‑Backup folder inside OneDrive) and recreating it with the exact same command, ensuring no stray spaces or quotation‑mark mismatches.
Frequently Asked Questions
Can I sync the entire D: drive?
OneDrive does not support syncing an entire drive letter directly. You can sync selected folders on D: by linking each folder individually, or by moving the needed folders into the OneDrive directory.
Will the symbolic link delete my original files?
No. A symbolic link is only a pointer; the original files remain on D: and are not duplicated unless you manually copy them.
Does this method work on Windows 7?
The OneDrive desktop client is not officially supported on Windows 7, so the described workflow requires Windows 10 or later.
Will syncing increase my local storage usage?
Because the files stay on D: and are only referenced, local storage on C: is not affected. However, OneDrive does keep a local cache of recently used files, which can consume a small amount of space.
Can I use this with OneDrive for Business?
Yes. The same symbolic‑link technique works with a Business account, provided the OneDrive for Business client is installed and signed in.
What if I exceed my OneDrive quota?
Sync will pause and the cloud icon will display a storage warning. Delete or move files to free space, or upgrade your plan, then resume syncing.