Madcap Flare's Too Long File Names
[Home] [Writing samples] [LinkedIn]
By Robert Delwood
You may get an error about a file name being too long, that it exceeds the 260 character limit. It's an insidious error. If the file name is too long, you at least get a red compile error and know it didn't work. If a component's name is too long, for instance, a reference to a graphic file, you don't get an error, and won't know about it until you actually look at that page. That's simple enough to do with one file, but if you have hundreds, you can't check each one after builds.
This error is a combination of mistakes by both Microsoft and Madcap. Windows has that 260 character limit for the combination file name a path. I call this a mistake on Microsoft's part because that error should have been removed after DOS. The Windows 10 Anniversary edition can remove this limit, but the correction is not automatically included. A system administrator has to set it for each computer. I call it a mistake on Madcap's part because during a build, Flare makes an insane number of temporary folders, hidden from the user. It's the total length of some the files, temporary folders, and project names and paths that causes the error.
To fix this problem, you have to shorten some of the names and paths. There's three ways of doing this.
- Shorten the root path. You can shorten the path to the Flare project file by moving the project to another location on the disk. Many advise to move it as close to the root as possible and also keep the sub directory's names short. For example, move it to c:\MDC\ProjA.
- Shorten the target name. Moving the entire project may not always be reasonable, especially within some corporate environments. Due to the way Flare does its build, shorten the target file name first. If that doesn't work, then shorten the folder names associated with the topics.
- Go virtual. If the path names to the Flare project are too long, and you can't shorten them, use a virtual drive. This feature allows you map a file path to a drive letter, as if that path is a separate drive. Although available, this option is not recommended. Madcap has not tested this. One example is that you can't open a PDF or Word file from the build folder that includes a virtual path. Also, the virtual path is not persistent between reboots. You have to either remap it each time, or create a batch file in the Startup folder.
- To create a virtual drive:
- Open a command window. For Windows 7, click the Windows icon. After that, or in Windows 10, enter cmd in the search box. A command window opens.
- Enter subst z: c:\pathname\of\the\directory\youwantmapped
- You specify any unused drive letter for z, and fully quality the path name to the directory you want mapped. The only restriction is that you have to open the project through Flare (rather than just double clicking the project) specifying it through the drive letter.
To delete the drive: In a command window on c:, enter z: /d
Again, use the actual drive letter instead of z.