File comments and metadata in a cross platform environment

1 Star2 Stars3 Stars4 Stars5 Stars
  • Product:
  • Version:
  • Document Type:
  • Revised:
  • Reviewed:


File comments and metadata (i.e. color labels) are stored in separate ways on Windows, Macintosh OS 9 (and earlier) and Macintosh OS X. For this reason, comments can be lost in a cross platform environment.


The history of comments in Macintosh OS is rife with behaviors that lead to them being lost. In the earliest implementations of the Macintosh OS, comments were kept in a file called the Desktop Database. Because this Desktop Database needed to be deleted and recreated occasionally, it became necessary to maintain the comments somewhere else. In Macintosh OS 7-9 the information was kept in the meta-information for the file. This meant that as files were copied and moved, their comments travelled with them.

With the introduction of Mac OS X, comments are no longer kept in the file meta-information (although type and creator still are). Instead, comments are kept in a directory meta-information file called .DS_Store. When OS X moves or copies files around, the .DS_Store files in the appropriate folders are modified so that the comments move along with the file, even though they aren’t stored in the meta-information of the file itself.

Since Mac OS X, Mac OS 9, and Windows operating systems all use different places to store file comments it is nearly impossible to maintain file comments in a cross platform environment. For example, if a Mac OS X user copies a file with comments to the server, the comments will properly be added to the .DS_Store file and will be viewable by other Mac OS X clients. However, if a Mac OS 9 or Windows user views that file it will have no comments. If the file is later moved to another directory by a Windows or Mac OS 9 user the comments will not be moved from the .DS_Store in the source directory to the .DS_Store file in the destination. Therefore, the file will appear to have lost its comment. Because there is still a comment in the original .DS_Store file if you move the original file or another file with the same name back to the original destination the comment will reappear.

Finally, the .DS_Store file was not designed for multi-user use. If multiple users modify the file simultaneously data loss can occur. Although this happens with comments it is more often seen with the default view and the positioning of icons for a folder. The problem is that the last person who writes to the .DS_Store will have their changes overwrite some or all of the changes other people have made. This is even further complicated by the fact that the .DS_Store files are written lazily. – that is, until the volume is unmounted the Finder will not try to put add its changes to the .DS_Store. So if you get unexpectedly disconnected from a sharepoint, again your comments can be lost.