4

As described in the title I would like to exclude some files from syncing to my (personal) OneDrive to save some space. I have some folders that I wish to sync but in some of them there are quite large video files which I do not want to sync.

I found this documentation from microsoft but I do not have the "Sync" option after I click on the "OneDrive admin center" link.

Also I found this question but the answer no longer works.

5

2 Answers 2

6

OneDrive added this feature a short while ago. Well somewhat. If you are using the OneDrive insider preview you can do this:

Copy %LOCALAPPDATA%\Microsoft\OneDrive\{OneDriveVersion}\adm OneDrive.adml (language file) to C:\Windows\PolicyDefinitions\en-US and the OneDrive.admx to C:\Windows\PolicyDefinitions.

Then in the Group Policy Editor (gpedit.msc) go to Computer Configuration -> Administrative Templates -> All Settings and find Exclude specific kinds of files from being uploaded. Now there you can specify specific file types or file names to ignore.

See also https://senpai.club/exclude-file-types/ and https://techcommunity.microsoft.com/t5/microsoft-onedrive-blog/celebrating-the-top-onedrive-moments-from-microsoft-ignite-2020/ba-p/1679821

5

Go to this folder

\AppData\Local\Microsoft\OneDrive\settings\Business1

Open this file

ClientPolicy.ini

and on the line

FilenameExclusionList = |~|.bin|.cache|node_modules|

Put the filename or folders names that you want to skip sync

2
  • That didn't work for me. The folder node_modules and its contents did get synced. And yes I closed and reopened OneDrive for Business.
    – theking2
    May 19, 2023 at 14:17
  • On MacOS the path is (very hard to find): /System/Volumes/Data/Users/<username>/Library/Application Support/OneDrive. The folder is not visible using finder, you must cd to it in terminal then "open ." Feb 27 at 10:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .