How to Stop OneDrive Files from Appearing in Local This PC Folders
Question details
The user wants to stop OneDrive from synchronizing local directories so that files remain strictly local, especially since macros fail to run from cloud locations.

- Product
- Microsoft OneDrive
- Device & OS
- Windows
- Scenario
- Following a computer repair, Known Folder Backup was automatically enabled, merging the local Desktop, Documents, and Pictures folders with OneDrive.
- Observed behavior
- Local files are unexpectedly forced into the cloud, causing them to appear in both the OneDrive directory and 'This PC' folders, which disrupts the functionality of macro-enabled files.
Before altering your synchronization settings, copy any critical files from your Desktop, Documents, or Pictures into a separate local folder (such as C:\Local Backup) to prevent accidental data loss during the transition.
Disable Known Folder Backup in OneDrive Settings
Turn off folder backup to stop OneDrive from automatically syncing your Desktop, Documents, and Pictures folders to the cloud.
Windows often enables Known Folder Backup by default during setup or after system repairs. Disabling this feature restores your default local paths and stops cloud duplication.
Locate and right-click the OneDrive cloud icon in the Windows taskbar (system tray). Select 'Help & Settings' and then click on 'Settings'.
In the OneDrive settings window, click on the 'Backup' tab at the top, then click the 'Manage backup' button.
You will see options for Desktop, Documents, and Pictures. Click 'Stop backup' under each folder you want to keep strictly local, then confirm your choice.
Restart your computer. Afterward, open your OneDrive folder, locate the files that were previously synced, and manually move them back to your local 'This PC' folders.

Move Macro-Enabled Files to an Unsynced Directory
If you prefer to keep OneDrive backup active for general files, isolate your macro-enabled files into a folder that OneDrive does not monitor.
Use WPS Office for Reliable Local File Editing and Macro Support
If Microsoft Office and forced OneDrive syncing are disrupting your workflow and breaking your macros, consider switching to WPS Office. It provides robust local file management, powerful VBA macro support, and a lightweight experience without forcing files into the cloud.
- 1. Download the Installer: Visit the WPS Office website to download the free, lightweight installer.
- 2. Open Your Local Files: Launch WPS Office and directly open your macro-enabled documents from your local hard drive.
- 3. Edit Without Interruption: Work on your spreadsheets and run macros safely without worrying about forced cloud synchronization.

Frequently Asked Questions
Why did my local files suddenly move to OneDrive after a computer repair?
During system updates or repairs, Windows may automatically enable the 'Known Folder Backup' feature. This links your local Desktop, Documents, and Pictures folders directly to OneDrive.
Will stopping OneDrive backup delete my files?
No. When you stop the backup, your files are kept safely in the OneDrive folder. However, they will no longer appear in your local Desktop or Documents folders until you manually move them back from the OneDrive directory.
Why won't my macros work when my files are saved in OneDrive?
Many macros rely on exact local file paths (such as C:\Users\Name\Desktop) to function. When OneDrive takes over a folder, the path changes to a cloud URL or a synchronized path, which often causes VBA code to fail.
Does unlinking my PC completely remove OneDrive files?
Unlinking your PC signs you out of OneDrive and stops all syncing. Any locally available files remain on your device, but online-only files will become inaccessible until you sign back in or access them via the web.




