How to Exclude Personal Shortcuts From OneDrive Known Folder Move
🔍 WiseChecker

How to Exclude Personal Shortcuts From OneDrive Known Folder Move

When you redirect your Desktop, Documents, and Pictures folders to OneDrive using Known Folder Move, OneDrive automatically syncs every file and shortcut in those folders. Personal shortcuts to network drives, local folders, or removable media will also sync to the cloud, which can clutter your OneDrive and cause sync errors when the target location is unavailable. This article explains how to prevent personal shortcuts from being moved and synced during Known Folder Move setup.

You will learn the exact settings to configure in the OneDrive sync app and in Group Policy to exclude shortcut files. We will also cover what happens to existing shortcuts after the exclusion is applied and how to verify that the policy is working correctly.

Key Takeaways: Exclude Shortcuts from Known Folder Move

  • OneDrive settings > Sync and backup > Advanced settings > Exclude specific file types: Add .lnk to prevent all shortcut files from syncing to OneDrive.
  • Group Policy > Administrative Templates > OneDrive > Exclude specific file types from Known Folder Move: Define a list of file extensions that will not be moved when Known Folder Move runs.
  • Windows Registry > HKCU\Software\Microsoft\OneDrive\Accounts\Business1\ExcludeFileTypes: Set a REG_SZ value with extensions like .lnk;.url to exclude shortcuts per user account.

ADVERTISEMENT

How Known Folder Move Handles Shortcuts

Known Folder Move is a OneDrive feature that redirects the Windows known folders—Desktop, Documents, and Pictures—to your OneDrive folder. When enabled, OneDrive copies all existing files and shortcuts from those folders to the cloud. Shortcut files, identified by the .lnk extension, are treated as regular files. They sync to OneDrive and appear on all devices that connect to the same OneDrive account.

The problem occurs when a shortcut points to a local resource that does not exist on another device, such as a mapped network drive or an external hard drive. When the target is missing, the shortcut becomes a broken link. Additionally, a large number of personal shortcuts can increase the total file count in OneDrive, potentially hitting storage limits or causing slower sync performance.

OneDrive provides two mechanisms to exclude shortcuts: per-user settings in the sync app and tenant-wide policies via Group Policy or the Windows Registry. The sync app method is best for individual users who want to stop syncing .lnk files. The Group Policy method is for IT administrators who need to enforce the exclusion across multiple devices in an organization.

Method 1: Exclude Shortcuts Using the OneDrive Sync App

This method applies to the current user only. You must have the OneDrive sync app installed and configured for your work or school account.

  1. Open OneDrive settings
    Right-click the OneDrive cloud icon in the system tray near the clock. Select Settings from the menu.
  2. Navigate to the Sync and backup tab
    In the Microsoft OneDrive dialog, click the Sync and backup tab at the top.
  3. Open Advanced settings
    Click Advanced under the Sync and backup section.
  4. Locate the Exclude specific file types area
    Scroll down to the Exclude specific file types section. Click the Edit button or the pencil icon next to it.
  5. Add the shortcut file extension
    In the text field, type .lnk and press Enter. You can add multiple extensions separated by semicolons, for example .lnk;.url. Click OK to save.
  6. Confirm the exclusion is active
    Close the settings dialog. OneDrive will stop syncing new .lnk files. Existing .lnk files in your OneDrive folder will remain synced unless you manually delete them from the cloud and local folder.

After completing these steps, any new shortcut file created in your Desktop, Documents, or Pictures folders will not upload to OneDrive. The shortcut stays only on the local device.

ADVERTISEMENT

Method 2: Exclude Shortcuts Using Group Policy

This method applies to all users in a domain-joined environment. You need administrative rights on the device and access to the Local Group Policy Editor or the Group Policy Management Console.

  1. Open the Local Group Policy Editor
    Press Windows key + R, type gpedit.msc, and press Enter.
  2. Navigate to OneDrive policies
    Go to Computer Configuration > Administrative Templates > OneDrive. If you are targeting only current user, use User Configuration instead.
  3. Find the Exclude specific file types from Known Folder Move policy
    In the list of policies, double-click Exclude specific file types from Known Folder Move.
  4. Enable the policy and add extensions
    Select Enabled. In the Options pane, under Exclude file types, type .lnk. Separate multiple extensions with a semicolon, for example .lnk;.url. Click OK.
  5. Force a Group Policy update
    Open a Command Prompt as administrator and run gpupdate /force. Restart the OneDrive sync app by right-clicking the cloud icon and selecting Close OneDrive, then launch it again from the Start menu.
  6. Verify the exclusion
    Create a test shortcut on your Desktop. Open OneDrive in File Explorer and check that the .lnk file does not appear. If the policy is active, the shortcut will remain only on the local device.

Group Policy overrides per-user settings. If you configure the policy, the exclusion applies to all users on the device regardless of their individual OneDrive settings.

Method 3: Exclude Shortcuts Using the Windows Registry

This method works for devices not joined to a domain or when you need a per-user exclusion without Group Policy. Editing the registry incorrectly can cause system instability. Back up the registry before making changes.

  1. Open Registry Editor
    Press Windows key + R, type regedit, and press Enter.
  2. Navigate to the OneDrive account key
    Go to HKEY_CURRENT_USER\Software\Microsoft\OneDrive\Accounts\Business1. If you have multiple accounts, look for Business1, Business2, and so on. Each account has its own key.
  3. Create or modify the ExcludeFileTypes value
    Right-click in the right pane, select New > String Value. Name it ExcludeFileTypes. Double-click the new value and set the data to .lnk. To exclude more types, separate with a semicolon, for example .lnk;.url. Click OK.
  4. Restart OneDrive
    Close OneDrive from the system tray and restart it. The exclusion takes effect immediately after the restart.

The Registry method is useful for testing or for devices that do not have Group Policy available. Changes apply only to the user account whose registry you edited.

What Happens to Existing Shortcuts After Exclusion

The exclusion settings described above prevent new .lnk files from syncing. They do not remove .lnk files that are already in your OneDrive folder. To clean up existing shortcuts, you have two options:

  • Delete from OneDrive online: Open OneDrive in a web browser, navigate to the folder containing the shortcuts, select the .lnk files, and delete them. They will be removed from all synced devices.
  • Delete from local folder: Remove the .lnk files from your local OneDrive folder. OneDrive will detect the deletion and remove them from the cloud as well.

After deletion, the shortcuts will not sync again because the exclusion policy blocks the .lnk extension. If you later disable the exclusion, OneDrive will sync any .lnk files that remain in the local known folders.

If Shortcuts Still Sync After Exclusion

Sometimes the exclusion does not take effect immediately. Check these common causes:

OneDrive cache is outdated

Close OneDrive, delete the contents of the OneDrive cache folder located at %LocalAppData%\Microsoft\OneDrive\settings\Business1, and restart OneDrive. The exclusion policy will reload.

Shortcuts are inside a subfolder that is not covered by the exclusion

The exclusion applies to all subfolders under the known folders. If a shortcut is inside a nested folder, it should still be blocked. If it syncs, verify that the file extension is exactly .lnk and not a different extension like .lnk1.

Group Policy is not enforced

Run gpresult /H report.html and open the report to confirm that the OneDrive policy is applied. If the policy is not listed, check the Computer Configuration path again and ensure the policy is set to Enabled.

Known Folder Move with Exclusion vs Without Exclusion

Item With Shortcut Exclusion Without Shortcut Exclusion
Shortcut files in OneDrive Not synced; stay only on local device Synced to cloud and all devices
Broken links on other devices No broken links because shortcuts are not present Broken links appear when target is unavailable
OneDrive storage usage Lower; no .lnk files consume space Higher; each .lnk file uses storage quota
Sync performance Faster; fewer files to process Slower; more files to upload and scan

You can now prevent personal shortcuts from syncing to OneDrive during Known Folder Move. Start by using the sync app method for your own device. If you manage multiple users, deploy the Group Policy or Registry method. After setting the exclusion, remember to clean up existing .lnk files from your OneDrive folder to fully remove them from the cloud. For advanced management, combine the shortcut exclusion with other file-type exclusions such as .tmp or .bak to keep your OneDrive clean.

ADVERTISEMENT