In OneDrive, if you add a folder to the synchronization, then all files and subfolders are included in the synchronization by default.
You can prevent certain file types from being synced by adding an exception for a specific file type – a file extension – to the OneDrive sync settings.
This way, only the files that you want to be included are synced, so all exceptions are not synced. This prevents you from getting the no need to disable synchronization. This is how it works.
Exclude file type(s) in OneDrive sync
Open OneDrive at the bottom right next to the time and date in the system tray. Then click the settings icon at the top right to open the settings.
Click on the “Sync and backup” settings at the top left. In the synchronization settings, click on “Advanced settings” at the bottom.
To exclude a specific file extension, click the “Exclude” button. There will be none backup made from excluded items in OneDrive, but cloud items are still synced to this computer.
Now enter an extension to prevent files from backing up to OneDrive. You do this by entering the file type without periods, for example only “exe” and no “.exe”. Click “exclude” to confirm.
Please note that this exclusion is only active for files that have not yet been backed up. All files in the cloud are not modified.
To resync an excluded file type, click the “X” to the right of the file type to remove the option.
Optional: Share files via OneDrive.
The file type will now be included in the backup again in future syncs.
I hope to have informed you with this. Thank you for reading!
Read more: How much disk space is still available on OneDrive?