When users copy files to some destinations other than the boot drive, they might get multiple files created, some of which can be invisible for some operating systems but visible in others. For the most part these files wont cause problems, but in some instances they can interfere with some functionality.
Apple Discussions poster Doug Rostad writes:
"Whenever I copy files to external windows formatted disks, a duplicate invisible file with prefix ._ is added. This causes problems, for example, when I copy music files to an mp3 player, it tries to play the invisible file and reports an error which is very annoying."
"._" Files These invisible files are "resource fork" segments of files that are being created on the external volume. In Macintosh filesystems (HFS and HFS ) there is support for two types of file information: one is the resource fork, and the other is the data fork. The data fork will contain user-supplied information such as the text of a word document, and the resource fork will contain information about the document such as author, document-specific preferences, and other metadata.
In Mac OS X filesystems these forks are treated as one file, and appear as such; however, resource forks are not supported on many filesystems, including those used on Windows machines (SMB and NTFS). As such, when users copy files to these systems the resource fork can be lost. Therefore Apple has built a file-handling mechanism into OS X which automatically splits the resource and data forks into two files when copied to disks that do not support resource forks.
.DS_Store Files Beyond the creation of resource fork files, OS X is notorious for cluttering windows-formatted volumes with other hidden files, such as trash folders and the irritating ".DS_Store" files which hold folder-specific settings.
These files can be created even when users just browse a windows volume, and while they may be invisible to Macintosh users, Windows users will see them created all over the place. Fortunately, deleting these files manually will not harm anything, but it can be very annoying to users to have these files constantly appearing.
There are several ways to manage these hidden files, and prevent them from occurring.
Use a third-party utility to manage hidden files Unfortunately there is no way of preventing the resource fork from being saved as a secondary file. However, if too many of them are being created then users can use third-party utilities to locate and remove the files. BlueHarvest (http://www.zeroonetwenty.com/blueharvest/) is a popular and cheap program that can manage hidden files created by OS X.
Manually prevent the creation of .DS_Store files on network volumes For network shared volumes that are displaying .DS_Store files to windows users, Macintosh owners can prevent the files from being propagated to network volumes by entering the following command in the "Terminal" application.
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
Unfortunately this will only work if this command is run on all Macintoshes accessing the external drive or network volume. It would be impractical to run this command on all Macintoshes in an environment with publicly accessible shared folders. As such, it would be best to regularly run utility software to remove the hidden files.
Save the file in an updated format Since resource forks are a legacy way of storing file information, users can try updating the file format to a more modern one. Users would have to open the document in a program that can properly read it, and then re-save it. For instance, if an old ".doc" Word document has a resource fork, loading it into the latest version of Word and saving it in the new ".docx" format should remove the resource fork.
There are file conversion tools such as "Mac Binary Converter," which can remove the resource fork from files, but it is recommended to use a program that can read the file as it was intended and save it in an updated format in order to ensure no data is lost.
Format external disks using HFS( ) If users are only using external disks with Macintosh computers, it is recommended to format the drive as a Macintosh-native filesystem (HFS or "Macintosh Extended"). This will prevent files with resource forks from being split into multiple files.