File Relations: Buddy Files

A buddy file (sometimes also referred to as sidecar file or sidekick file) is a file which is related to a master file and contains some additional information or data.

Typical uses for using buddy files are:

The following image shows a typical example for buddy files. A RAW file has buddy files in JPEG and WAV format.

You want to keep master and buddy file(s) together when you move, copy or rename the master file. This ensures that the relation between the files is not broken and that audio annotations, preview JPEGs or the XMP metadata remains accessible and working.

 

For example, if you use Nikon RAW, you will see file pairs like

_DSC_12345.NEF
_DSC_12345.JPG
_DSC_12345.WAV

The WAV audio file and the JPG preview files are buddy files of the NEF master file.

Photographers using Canon's RAW formats may see

_DSC_12345.CR2
_DSC_12345.JPG
_DSC_12345.WAV

These naming schemes are simple: To find a buddy file for the master RAW just replace the master's file extension with .JPG, .WAV or .THM, respectively. And this rule is exactly what a relation definition would use. Since buddy files usually have to be in the same folder as the master file you don't need to worry about searching in sub-folders. There are some exceptions to this rule because some RAW processing applications store buddy files in sub-folders. IMatch file relations can handle that too.

If you tell IMatch which buddy files you use via a relation definition it will keep track of these files for you. It will automatically move, copy, rename or delete the buddy when you move, copy, rename or delete the master file.  

Windows Explorer does not handle buddy files so you should take extra care when you work with files in Windows Explorer.

Choosing Names for Buddy Files

It is important to use sensible buddy names. Although the regular expressions available for relations are very powerful and can 'grab' even buddy file names which are very different from the master file name, you should stick to simple naming schemes. You can add postfixes or prefixes to the buddy file name, but do include the name of the master file.

The buddy file name always should contain the name of the master file.

Some examples for good and bad buddy file names:

Master NameBuddy Name
beach_123.raw
beach_123.jpg
_DSC098990.raw_DSC098990_web.jpg
_DSC098990.raw_DSC098990-print.tif
_DSC098990.raw_DSC098990.raw.bib
Uncle-Bert-001.rawSmall_Version_of Uncle-Bert-001.jpg
Bad Buddy File Names
The master file name is not part of the buddy file name.
_DSC098990.raw098990.jpg
beach_123.rawbeach-123.jpg

Copy, Move, Rename

The reason for this is to allow IMatch to produce buddy file names when moving or copying files. When you copy or move a master from folder A to B, it may happen that the master file has to be renamed because a file with the same name already exists in the target folder.

When IMatch has to copy/move buddy files at the same time, it has to rename them as well. This can be easily done if the buddy name contains the file name of the master. IMatch here attempts to produce the buddy file name by replacing the old master name in the buddy name with the new master name.

For example: The master is named beach_123.raw and has a buddy file beach_123.jpg

During a move/copy operation, IMatch renames the master to beach_123-1.raw to ensure a unique file name. To produce the new name of the buddy file, it replaces the name of the master ("beach_123") in the buddy file name with the new master name ("beach_123-1"). The buddy file hence is renamed to beach_123-1.jpg.

As long as the buddy file name includes the master file name, this schema works great. Even if the buddy file has a name quite different from the master:

Master NameBuddy Name
beach_123.raw
renamed to:
beach_123-1.raw
beach_123.jpg

beach_123-1.jpg
beach_123.raw
renamed to:
beach_123-1.raw
beach_123_web.jpg

beach_123-1_web.raw
beach_123.raw
renamed to:
beach_123-1.raw
Copy of beach_123_web.jpg

Copy of beach_123-1_web.raw
beach_123.raw
renamed to:
beach_123-1.raw
beach_for_print.jpg

???

The last example will not work because IMatch is unable to determine what to change in the buddy file name to make it unique and still match the master file name. Avoid such scenarios.

XMP Files

XMP sidecar files are special. IMatch automatically handles these files and you shouldn't create relation definitions for this file type.

See Configuring Relations to learn how to enable buddy file management for your files.