DSStore Definition

.DSStore is the name of a file in the Apple OS X operating system for storing custom attributes of a folder such as the position of icons or the choice of a background image.[1] The name is an abbreviation of Desktop Services Store,[2] reflecting its purpose. It is created and maintained by the Finder application in every folder, and has functions similar to the file desktop.ini in Microsoft Windows. Starting with a full stop (period) character, it is hidden in Finder and many Unix utilities. Its internal structure is proprietary.

The file .DSStore is created in any directory (folder) accessed by the Finder application, even on remote file systems mounted from servers that share files, for example via Server Message Block (SMB) protocol or the Apple Filing Protocol (AFP). Remote file system, however, may be excluded by operating system settings. Although primarily used by Finder, these files were envisioned as a more general-purpose store of metadata about the display options of folders, such as icon positions and view settings.


The complaints of many users prompted Apple to publish means to disable the creation of these files on remotely mounted network file systems. However, these instructions do not apply to local drives, including USB flash drives. Before Mac OS X 10.5, .DSStore files were visible on remote filesystems.

.DSStore files impose additional burden on revision control process: They are frequently changed and therefore appear in commits, unless specifically excluded.

.DSStore files are included in archives, such as ZIP, created by OS X users, along with other hidden files and directories.

.DSStore files have been known to adversely affect copy operations.

Known Issues

DSStore error code -36
On some rare occasions when trying to copy files, Mac users may encounter "error code -36", which completely halts the copy or move process in the OS X Finder. The full error is usually read as “The Finder can’t complete the operation because some data in “FileName” can’t be read or written. (Error code -36)”. The filename is sometimes .DSStore, but it can happen with just about any file.

If you run into Error Code -36 on a Mac, there’s usually a really simple solution thanks to a handy command line tool called "dotclean". If you’ve never heard of dotclean, you’re certainly not alone, and the manual page for the command explains that it "merges .* files with corresponding native files." which may not sound like much to the casual user, but given the oft cause of Error 36 are files prefixed with a dot, that can be exactly what you need to do.

  1. Launch the Terminal (found in /Applications/Utilities/ or with Spotlight)
  2. At the command prompt, type:
    dotclean /Path/To/Directory/With/Problem/
  3. When dotclean is finished, attempt the file copy again and it should succeed with no error code

For example, if copying files, ~/Documents/FileBackups/ is the problematic directory, use:
dotclean ~/Documents/FileBackups/

That should be all that is necessary to resolve the issue, just be sure to attempt the file/directory transfer immediately after the command is run.

Technically you could point dotclean at an entire volume but that’s probably not necessary unless the -36 error is continuously triggered in Finder when trying to backup an entire drive manually.

If the problem is recurrent and you get it constantly when trying to copy files to and from a networked Mac, a network share, external drive of some sort, or to and from a Windows computer, you can also try to delete all .DSStore files on a Mac using the command line, which can work as a temporary workaround if for some reason dotclean fails. That was actually what I had done in the past to get around this and other similar input/output error messages before discovering this specific command approach.

dotclean worked fine to resolve Error Code -36 when copying a directory from a Mac with OS X 10.9.5 to a Mac with OS X 10.10.3 and also to a Windows PC, the original machine was repeatedly throwing the error. It appears as if this error has had an uptick with OS X Yosemite as well, maybe suggesting some incompatibility with certain dot files from other OS versions.

DSStore Error code -50
If you are experiencing errors when executing the first file/folder copy to your SMB share but the second attempt works; please see below for possible solutions.

Death to .DSStore

El Capitan Update OS X 10.11 
In OS X El Capitan, Apple introduced a new feature called System Integrity Protection (SIP) which prevents filesystem and runtime modification of the operating system. Unfortunately, this prevents the mechanism that Death To .DSStore uses from working on the Finder process. You can disable SIP to get things working again, although a better choice might be to head over to https://bugreport.apple.com/ and file a radar.

Note: On OS X 10.11 you can not inject code into system apps.

Disable System Integrity Protection (rootless) in OS X El Capitan

Finder Alternatives

XtraFinder is a free application available from Tran Ky Nam Software. In addition to tabs, which Mavericks now adds, XtraFinder offers Dual Paned file browsing, a pinned Finder window that can slide in from the bottom of your screen for quick access to your files and a load more tweaks.

TotalFinder is available from BinaryAge for $18 after a 14-day free trial period. TotalFinder has the same major feature set as XtraFinder however your $18, and the loss of a few minor tweaks, gets you more polish and less of an impact on system performance. It also has better developer support and releases faster updates when OS X has major changes.

Path Finder
Path Finder is available from Cocoatech for $40 after a 30-day free trial period. It is a completely different beast than XtraFinder and TotalFinder. While it has most of the features that the other two do, it also has a lot more. Where XtraFinder and TotalFinder are focused on improving Finder, Path Finder aims to totally replace it.