Automation MadCap Flare

Free Tool: Automatically Synchronize External Resources in MadCap Flare

In my master Flare project, I like to include PDF-versions of the webhelp targets, so that users can either download the PDF, or read the online help. It’s all built from the same TOC.

2015-07-02 14.38.55

To keep this up-to-date, the PDFs are built and published to a network folder, and then re-imported to the Flare project using External Resources.

The problem is that to make sure the PDF and the webhelp are both up-to-date, I need to follow this process:

  1. Rebuild and publish the PDF.
  2. Re-import the PDF using External Resources.
  3. Rebuild and publish the webhelp target.

Steps 1 and 3 I can handle using batch builds, but step number 2 is a manual process. A solution could be to set up my batch job to use Robocopy to copy the external resources to my Flare project before I build it. This leaves me two options:

  • Copy all files from the External Resources to the local project
  • Maintain a list of files I need to copy, and pray that it never gets out of date.

Because the External Resources folder contains close to 2 Gb of files I don’t want to copy them all to my local project, and because I’m afraid the list would get out of date quickly, I found another solution.

The Flare project file (.flprj) contains an XML structure listing all the External Resources you have mapped to your project, so I could use that information to synchronize only the files that were mapped.

Said and done, here’s a script that looks at the XML of the Flare project file and copies any External Resource files that are newer than your local files.

Synchronize External Resources Automatically in MadCap FlareSynchronize External Resources Automatically in MadCap Flare To test the tool, you can just run the Exe, and it will prompt you to select the Flare project you’d like to synchronize (remember to check out the relevant files if you’re using source control).

If you’re satisfied with how it works, you can set it up to run in a batch file. The command line syntax is

C:\>GetExternalResources.exe “C:\FlareProjectPath\FlareProjectFile.flprj”

Let me know if you have questions or comments! Ideas for improvement are always welcome 🙂

One Reply to “Free Tool: Automatically Synchronize External Resources in MadCap Flare

  1. Hi Mattias,

    I would love to use your tool to help automate a madcap build process for my project, but the link is broken. Could you either upload the exe again and/or publish the source code so I could customize it to my needs?

    Thanks 🙂

    Noah Silvera

Leave a Reply

Your email address will not be published. Required fields are marked *