TechBuzzPro

Exclude Files from OneDrive Sync – Quick Guide

· 5 min read · Apps & Browsers

In this article
  1. What You'll Need
  2. Step‑by‑Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

Yes, you can exclude individual files or folders from OneDrive sync by using the built‑in selective sync and folder‑level exclusion settings.

What You'll Need

  • OneDrive desktop client installed and signed in on Windows 10/11 or macOS.
  • Administrator rights if you need to change Group Policy settings on Windows Pro/Enterprise.
  • A stable internet connection for the initial sync check.

Step‑by‑Step

  1. Locate the OneDrive icon in the system tray (Windows) or menu bar (macOS). If the icon is hidden, click the up‑arrow to reveal it.
  2. Right‑click the icon and choose Help & Settings ► Settings. On macOS the path is OneDrive ► Preferences ► Account.
  3. In the Settings window select the Account tab (Windows) or the Account pane (macOS). Click the Choose folders button.
  4. You will see a tree view of all folders inside your OneDrive cloud. Uncheck any folder you do not want to sync to this PC. Click OK to apply. The unchecked folders remain in the cloud but no files inside them will be downloaded or uploaded from this device.
  5. To exclude a single file, move it into a folder that you have unchecked in the previous step. OneDrive does not provide a per‑file exclusion toggle; the only reliable way to keep a file from syncing is to place it in a non‑synced folder.
  6. If you need to keep a folder structure but want certain file types (for example *.psd or *.mp4) to stay local, use the Group Policy editor (Windows Pro/Enterprise) or the registry for Home editions:
    1. Press Win+R, type gpedit.msc and press Enter.
    2. Navigate to Computer Configuration ► Administrative Templates ► OneDrive.
    3. Double‑click Exclude specific file types from OneDrive sync.Set the policy to Enabled and enter the extensions you wish to block, separated by semicolons (e.g., *.psd;*.mp4;*.tmp).
    4. Click Apply and OK. Restart OneDrive for the change to take effect.

    Home editions without gpedit.msc can achieve the same result by editing the registry at HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\OneDrive and creating a DWORD value named ExcludeFileTypes with the same semicolon‑separated list.

  7. For macOS, there is no native Group Policy equivalent. The practical workaround is to keep large or unwanted file types in a folder you have unchecked via the Choose folders dialog.
  8. After making changes, let OneDrive finish its sync cycle. You can monitor progress by clicking the OneDrive icon and reviewing the status messages.
  9. If you later decide to sync a previously excluded folder, repeat steps 1‑4 and re‑check the folder.

Common Mistakes

  • Unchecking the wrong folder. The tree view shows nested folders; unchecking a parent folder automatically excludes all children. Double‑check the hierarchy before confirming.
  • Expecting per‑file exclusion. OneDrive does not have a UI toggle for single files; placing the file in a non‑synced folder is the only supported method.
  • Editing the wrong registry key. The OneDrive exclusion policy lives under HKLM\Software\Policies\Microsoft\OneDrive. A typo will have no effect and may cause other policies to break.
  • Forgetting to restart OneDrive. Policy changes are read only at startup. Without a restart the new file‑type exclusions will not be applied.
  • Using the "Free up space" option as exclusion. That command makes a file online‑only but still keeps it in sync. It does not prevent future changes from uploading.

Tips

  • Group similar files into dedicated folders before you start the exclusion process. This makes selective sync easier to manage.
  • If you share a OneDrive library with coworkers, communicate which folders are excluded locally to avoid confusion about missing files.
  • Use the OneDrive web interface (onedrive.com) to verify that excluded folders and file types remain safely stored in the cloud.
  • When working on a laptop with limited storage, combine selective sync with Files On‑Demand (Windows) or the “Optimize Storage” toggle (macOS) to keep only placeholders locally.
  • Document any custom registry or policy entries in a text file. This helps when you need to reinstall Windows or migrate to a new device.

Troubleshooting

If excluded files still appear to sync, follow these steps in order:

  1. Restart OneDrive. Right‑click the icon ► Close OneDrive**, then reopen it from the Start menu or Applications folder.
  2. Check for updates. In the Settings window, go to the About tab and click Version to see if a newer client is available. Install any pending updates.
  3. Verify the folder selection. Re‑open the Choose folders dialog and confirm the unchecked boxes are still unchecked.
  4. Confirm Group Policy is applied. Run gpresult /h gpresult.html in an elevated Command Prompt and open the generated HTML file. Look for the "Exclude specific file types from OneDrive sync" setting under the OneDrive node.
  5. Inspect the registry. Open regedit and navigate to the policy key. Ensure the ExcludeFileTypes value contains the exact extensions you entered, without extra spaces.
  6. Clear the local cache. Exit OneDrive, then delete the hidden %localappdata%\Microsoft\OneDrive\cache folder. Restart OneDrive; it will rebuild the cache based on current policies.
  7. Sign out and back in. In the Settings window, go to the Account tab and click Unlink this PC. Sign in again and re‑apply your folder selections.
  8. Reinstall OneDrive. As a last resort, uninstall the client via Settings ► Apps (Windows) or drag the app to Trash (macOS). Download the latest installer from the official Microsoft site and repeat the setup.

If none of the above resolves the issue, contact Microsoft Support with a screenshot of your folder selection and any custom policy entries.

Frequently Asked Questions

Can I block a single file type without using Group Policy?

No. The consumer OneDrive client only offers folder‑level exclusion. Blocking specific extensions requires the Group Policy or registry method available on Windows Pro/Enterprise.

Does moving a file to an unchecked folder delete it from the cloud?

No. The file remains in OneDrive’s cloud storage; it simply stops syncing to the local device.

Will Files On‑Demand keep a file from uploading?

Files On‑Demand controls local storage, not upload behavior. Files are still uploaded when edited, even if they are stored online‑only.

Can I exclude files on macOS using a terminal command?

macOS does not provide a native command‑line equivalent to the Windows exclusion policy. The reliable method is to keep the files in a folder that you have unchecked via the OneDrive preferences.

What happens if I delete an excluded folder locally?

Since the folder is not synced, deleting it on the local machine does not affect the cloud copy. The cloud version remains untouched.

Is there a limit to how many folders I can exclude?

OneDrive does not impose a hard limit on the number of unchecked folders. Performance may degrade if you manage thousands of individual selections, so grouping related content is recommended.