Hidden .DS_Store Files Preventing OneDrive Mac Client File Sync

For those using the OneDrive client on a Mac, you may come across a synchronization error that is caused by a .DS_Store file. It appears like this:

In MacOS, these files are relatively unimportant, as they only store info about directory appearance such as icon position. These files can prevent OneDrive from syncing and are difficult for the average user to track down because they are hidden by default. The below command can be run in terminal to correct the issue:

find /users/username/onedrivepath/ -name ".DS_Store" -depth -exec rm {} \;

Where “/users/username/onedrivepath/” is the path being synchronized for OneDrive.