Excluded File Extensions in OneDrive Personal

June 19, 2023
5 min read

Excluding files in the sync from a device to the cloud is not new. For OneDrive for Business, I wrote about this first on 11/18/2020 and then again on 11/23/2020. This is a group policy that the user cannot influence. The principle has not changed but it is now shown to the user in the settings:

Screenshot showing the settings of a OneDrive for Business account, which now shows a section named Excluded file extensions and a note that the settings are managed by the organization. The screenshot shows that file extensions that end with .LNK plus files named TEST.TXT will be excluded from sync.
Figure 1: The Excluded file extensions shown in the settings of a OneDrive for Business account. | Used with permission from Microsoft. | View Full Size

Open OneDrive for Business and go to Settings > Sync and Backup > Advanced Settings. Figure 1 shows the user that all files with the extension LNK as well as all files with the name Text.txt are not synchronized to the cloud. But only all newly added files. The user has no way to change these restrictions made by IT. That's nice because the user had no other way to retrieve these settings himself. But is that all? It turns out, no.

So Why Write a New Article After 2.5 Years?

I overheard in passing that the product team was continuing this work. I knew since the MVP Summit in April 2023 that the product group was working on something similar for OneDrive Personal. Unfortunately, the high clock rate of OneDrive versions without information makes it impossible to test anything if you don't know what to test. I know that in version 23.101.0514.0001, this display was not seen yet. But in version 23.109.0523.0001 it is there.
 

The screenshot in Figure 2 shows the settings of a OneDrive Personal account. Here, excluded file extensions are ZYK, XXX, and lnk.
Figure 2: The settings of a OneDrive Personal account. | Used with permission from Microsoft. | View Full Size

Let's switch to OneDrive Personal.

In Figure 2 I have entered several file extensions here as a user. While the entries in OneDrive for Business can be a wildcard sequence of file names and file extensions, OneDrive Personal only permits the user to enter file extensions. They also only take effect on the respective device. Entries of OneDrive for Business are stored in the registry, the entries of OneDrive are stored in the user directory under the filename odignore.txt:

C:\Users\[Username]\Appdata\Local\Microsoft\OneDrive\settings\Personal\odignore.txt

However, we see an entry that cannot be deleted or modified by the user. This comes from the group policy entry named Exclude specific kind of files from being uploaded from the device configuration.

Screenshot shows OneDrive Group Policy in the computer configuration with the String-ID set to EnableODIgnoreListFromGPO.
Figure 3: Details of the group policy named Exclude specific kind of files from being uploaded. | Used with permission from Hans Brender. | View Full Size

This Group Policy allows you to enter keywords to prevent the OneDrive synchronization application (OneDrive.exe) from uploading certain files to OneDrive or SharePoint. You can enter full names, such as "setup.exe", or use the asterisk (*) as a wildcard for a series of characters, such as *.pst. Keywords are not case-sensitive.

A slide image with text and screenshots shows some characteristics of the Computer Group Policy and special features. The slide describes how using a group policy, you could use wildcard characters to exclude some files from sync to the cloud.
Figure 4: Shows some characteristics of the Computer Group Policy and special features. | Used with permission from Hans Brender. | View Full Size

If you enable this group policy, the sync app will not upload new files that match the keywords you specify. No errors are displayed for the skipped files, and the files remain in the local OneDrive folder. In File Explorer, the files are displayed with an "Excluded from sync" icon in the status column. The OneDrive sync app must be restarted after enabling this setting for the setting to take effect.

Bypass the Exclusion With a Web Browser

Users can still view their OneDrive in a web browser and they can use the browser to upload an excluded file from their local OneDrive folder to OneDrive. I recommend that users remove the local file after this process, as a file with the same name in the same folder may cause a sync conflict with the skipped file.

If you disable or do not configure this setting, all supported files in all synchronized folders will be uploaded.

Now go back and review Figure 2 and note where I have numbered two items in red. Office files (i.e., file extensions from Office such as pptx, docx or xlsx) can be entered, but the sync application skips this exclusion. The background to this is that the desktop variants of these Office programs can communicate directly with the cloud. Microsoft has not changed this inner logic.

Summary

I advise every company not to use OneDrive Personal in the company. This is because administrators cannot prevent business documents from being shared with external parties via OneDrive Personal. For that, there is a group policy that excludes synchronization with OneDrive Personal.

On the other hand, there are millions of devices running OneDrive Personal and here Microsoft has now created a simple way to exclude files with certain file extensions from synchronization. For example, games: Files that store configurations, game scores or high scores will not need to sync with the cloud. This is exactly what Microsoft has now made possible.

Vison and Wishes

I showed the illustration on a slide during my talk at aMSBerlin and had a small discussion with an attendee that moved me to add this addendum. Microsoft should take what exists as a group policy for OneDrive for Business and put the same logic in OneDrive Personal:

  • Extension around filenames.
  • Extension around wildcards.
  • Simplify the issue of Office files.

Related Link

Hans Brender

Hans Brender

Hans Brender is a Collaboration Specialist and has been a Most Valuable Professional (MVP) in Germany for 11 years. Most people around the world know him as Mr. OneDrive. For the last 11 years he has been talking about OneDrive and collaboration around the world at conferences like Microsoft Ignite, Microsoft Build and local community events. These days he is networking, mentoring, leads a monthly live show about M365 news and gives workshops to the community, mid-size- and Enterprise companies.

In addition to the social profiles below, you can find Hans at: @hansbrender.bsky.social