Cloning Files

Did You Know?

Normally, when you copy a document and its attachments, the attached file on the copied document is the same file as the original. If changes are made to the file in the first document, those changes are seen when the file is opened from the second document, because it is the same file. The file ends up “linked” to both documents. However, we realized that there may be times when you actually want to copy a file and end up with two files that are identical to begin with, but can be edited independently. For example, you may want to start each Meeting Minutes document with a copy of last week’s agenda, but then make changes to the new agenda without affecting last week’s agenda.  That is why, since V4.6 (many years ago), we have allowed for what we call file “cloning” (to differentiate it from the normal way that Spitfire copies files).

Understanding the difference between a copied/linked file and a cloned file:

Copied Document with Copied/Linked File Copied Document with Cloned File
  • Files on both documents start out exactly the same.
  • There is only one file in the Catalog.
  • Changes made to the file in one document are seen when the file is viewed from the second document.
  • Files on both documents start out exactly the same.
  • There are now two files in the Catalog.
  • Changes made to the file in one document do not affect the file on the other document.

Setup:

Spitfire knows which files to copy/link and which to clone based on the following DocCopyConfig rules.

  • AttachmentCloning: specifies the list of file types that should be cloned when the document is copied.
  • AttachedTemplates: specifies if files created from a bookmark template for that Doctype should be cloned, copied or ignored when the document is copied.
  • AttachmentFilter: specifies if all or just certain attachments will be linked or cloned when the document is copied.

For example:

  • AttachmentFilter = DocKey IS NOT NULL means that only attached files (not documents) will be considered for cloning to the new Meeting Minutes document AND
  • AttachedTemplates = Auto means that files created from an Attachment template will be cloned AND
  • AttachmentCloning = docx; means that Microsoft Word files (and only Microsoft Word files) will be cloned.

In this example, when Meeting Minutes document #0019 is copied (through the Create Next Meeting button), the docx file on Meeting Minutes #0020 is cloned and the xlsx file is copied/linked.

Doc #0019

Doc #0020

Tip:

If the filename of a file created from a template ends with a numeric prefix, that number will increment on the cloned file, by default.  (See the FileCatalogConfig | TemplateAttachSuffix rule.) Otherwise, you should manually differentiate between a cloned file and an original file by changing the filename of the cloned file, so that you can more easily tell the two files apart in the Catalog.


Keywords: to clone file, copy file