Mac OS X: "Error code -37" When Copying Files to Earlier AppleShare Servers

An alert box with the message "Error code -37" may appear when you try to copy files from a Mac OS X computer to another computer that is using AppleShare Filing Protocol (AFP) 2.2 or earlier.
Symptom

An alert box with this message appears when a Mac OS X computer attempts to copy a file to another computer:


Client operating systems:

Note: Mac OS X Server is affected when acting as a client of affected servers.

Solution

When copying to an AFP 2.2 or earlier server, check the full file name of the file being copied to be sure that it is not over 31 characters. Updated server software can accommodate longer file names.

At the client computer:

Some operating systems can be set up to automatically hide file name extensions, such as ".jpg", that appear at the end of file names. When set up this way, the actual file name differs from what is displayed in the graphical user interface (GUI). The Mac OS X Finder window is an example of a GUI. You may be led to think the file name is exactly what you see on screen, though the file system name may actually differ. Mac OS X can hide file name extensions, but Mac OS 9 does not. This means the full name will be displayed in Mac OS 9 and earlier. Users of Microsoft Windows operating systems connecting to these servers may see similar symptoms, since Windows can be set up to hide file extensions. There are several ways to view file extensions in Mac OS X, but these steps describe the two easiest ways:

This will show file extensions for all files in the Finder or on the desktop until you deselect the preference. To view the extension of a single file:

At the server:

AppleShare Filing Protocol 2.2 and earlier is limited to 31 characters for full file system names. Later versions of the AFP server are not bound by this limitation, allowing users to save files that are longer than 31 characters. Upgrading to Mac OS X Server 10.0.3 or later, which includes AFP 3.0 or later, allows files to be copied with up to 255 characters in a file system name.
Published Date: Feb 17, 2012