Fix OneDrive Constantly Uploading WSL Symlinks
Question details
The user needs to resolve an issue where OneDrive gets stuck in a continuous loop, repeatedly attempting to upload Linux-style symbolic links created via Windows Subsystem for Linux (WSL).

- Product
- Microsoft OneDrive / WSL
- Device & OS
- Windows
- Scenario
- Syncing local directories to OneDrive that contain symbolic links generated from within a WSL environment.
- Observed behavior
- OneDrive enters a stalled synchronization state, repeatedly failing to process the Linux-style symlinks while constantly reporting that it is uploading them.
Ensure you have administrative privileges on your Windows machine, as locating reparse points in system folders and creating Windows-style symlinks requires elevated permissions.
Locate and Replace Problematic WSL Symlinks
Use a PowerShell script to find incompatible Linux-style symlinks in your OneDrive folder and manually replace them with Windows-compatible symlinks.
OneDrive's sync engine does not natively support syncing Linux-style symbolic links created inside WSL, leading to infinite upload loops. The most effective workaround is identifying these stalled files and recreating them as standard Windows symlinks.
Click the Windows Start menu, type 'PowerShell', right-click the Windows PowerShell app, and select 'Run as administrator'.
Type the command 'cd "C:\Users\YourUsername\OneDrive"' (replacing YourUsername with your actual Windows account name) and press Enter to set the working directory.
Run the command: Get-ChildItem -Recurse -Force | Where-Object {$_.Attributes -match "ReparsePoint"} | Select-Object FullName. This will list the exact file paths of all symlinks in your OneDrive folder.
Navigate to the file paths identified in the previous step and delete the incompatible WSL symlinks that are causing the sync loop.
Open an elevated Command Prompt and use the 'mklink' command (e.g., mklink /D "LinkName" "TargetDirectory") to recreate the links in a format that OneDrive can properly recognize and sync.

Manage Your Documents Efficiently with WPS Office
While troubleshooting complex file sync issues like WSL symlinks in OneDrive, you deserve an office suite that keeps document management simple and stress-free. WPS Office is a lightweight, powerful alternative to Microsoft Office that provides a seamless working environment.

Frequently Asked Questions
Why does OneDrive get stuck when uploading WSL symlinks?
OneDrive's sync engine is designed primarily for the Windows NTFS file system. Linux-style symbolic links created by WSL have different internal structures and metadata, causing OneDrive to repeatedly misread them and fail the upload process.
How can I stop OneDrive from trying to sync my WSL projects?
If your WSL projects are isolated in a specific folder inside your OneDrive directory, you can exclude that folder from syncing. Right-click the OneDrive icon in your system tray, click the Settings gear icon, go to 'Account' > 'Choose folders', and uncheck the folder containing the WSL symlinks.
Can I automate the creation of Windows symlinks from inside WSL?
Yes. Community-created scripts like 'lnw' (available on GitHub) allow you to execute a command within your WSL terminal that calls the Windows 'mklink' executable with elevated permissions, seamlessly creating a Windows-style symlink.




