OneDrive File Issues

Handle desktop.ini Files Blocked by OneDrive Sync

Huda QurayshiHuda Qurayshi Nov 14, 2026 868 views

Question details

The user needs a practical way to handle desktop.ini files blocked by OneDrive during large-scale migrations.

How to Handle desktop.ini Files Blocked by OneDrive Sync
Product
Microsoft OneDrive
Device & OS
not provided
Scenario
Migrating files from Work Folders or another storage system into OneDrive for many users.
Observed behavior
OneDrive blocks desktop.ini files and reports synchronization errors; deleting the files may not be practical because Windows can regenerate them.
Before you start

Check the OneDrive sync error details to confirm that desktop.ini is the affected file. Identify whether the files are being copied into local OneDrive folders or uploaded through a migration tool, because the available exclusions differ.

Solution 1Recommended

Exclude desktop.ini from Windows migration copies

Use a filename exclusion when copying migration data on Windows so source desktop.ini files are not copied into the destination.

This prevents the specified source files from being copied; it does not stop Windows from creating new desktop.ini files later or resolve existing OneDrive sync errors.

1
Identify the migration paths

In File Explorer, locate the source folder and the intended local OneDrive destination folder. Confirm that your migration process permits a direct file copy.

2
Run a filtered copy

Open Command Prompt and run: robocopy "C:\Source" "C:\Users\User\OneDrive - Organization\Destination" /E /XF desktop.ini. Replace both paths with the actual source and destination paths.

3
Review the result

Check the Robocopy output for copy failures, then select the OneDrive cloud icon and open its sync problems view to check for remaining errors.

Folder customization may not migrate: desktop.ini can store folder display settings. Excluding it may prevent those customizations from carrying over.
Free Microsoft Office alternative

Work with Office Documents in WPS Office

WPS Office is a free, lightweight alternative with a familiar interface for working with Microsoft Office files during and after a migration. It does not change OneDrive's sync rules or fix desktop.ini errors.

Open and edit documents as you move work between storage systemsCompatible with Microsoft Office formats including DOCX, XLSX, and PPTXFamiliar tools for documents, spreadsheets, and presentationsFree and lightweight for everyday office work
microsoft office alternative - wps office

Frequently Asked Questions

Can I force OneDrive to sync a blocked desktop.ini file?

OneDrive does not provide a standard user setting to force synchronization of blocked desktop.ini files. Instead, review the sync error and consider excluding the file from the migration copy.

Why does desktop.ini return after I delete it?

Windows can recreate desktop.ini to store folder display settings. For large migrations, excluding the filename in the copy process is generally more practical than repeatedly deleting it.

Can administrators exclude desktop.ini from OneDrive uploads?

Administrators can evaluate the OneDrive policy "Exclude specific kinds of files from being uploaded" and test a filename entry. Its behavior and scope should be verified against current Microsoft documentation before deployment.

Will excluding desktop.ini prevent other files from being copied?

The Robocopy option /XF desktop.ini excludes files with that name from the copy. Other files are still subject to permissions, path limits, and any other options used in the command.