HTML Export Problem Caused by Path Lengths

When exporting to HTML, Visio may crash, and an error is reported in the publication logs (if running an automated publication) or in the progress windows (if running Process Navigator interactively).

The error message will depend on the path length. Examples are:

15/11/2010 11:16:57HTML Target Cannot be Written ToThe target of the HTML export c:\triaster\processlibraries\processlibrary\sandpit\html\test\long folder name 235xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\a.b.html already exists and is read-only. Check the folder permissions and read-only status.This condition can also occur in Visio 2003 when Track Markup is turned on.

15/11/2010 13:05:37Visio has reported an unanticipated exception when exporting to c:\triaster\processlibraries\processlibrary\sandpit\html\test\long folder name 245xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\aa3.b.html

=== Begin For Triaster Support ===The following content may be useful to the Triaster support team.Please copy and paste it into an e-mail to support@triaster.co.ukand attach any referenced files if you would like help understandinghow to avoid this issue reoccurring.

File not found.Visio has reported an unanticipated exception when exporting to c:\triaster\processlibraries\processlibrary\sandpit\html\test\long folder name 245xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\aa3.b.html

=== Begin For Triaster Support ===The following content may be useful to the Triaster support team.Please copy and paste it into an e-mail to support@triaster.co.ukand attach any referenced files if you would like help understandinghow to avoid this issue reoccurring.The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.Failure exporting c:\triaster\map store\processlibrary\2 maps for review\Test\Long Folder Name 250xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\aa3.vdx to html.

System.IO.PathTooLongException: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.

Files or folders to be created in the HTML export would exceed the path-length limit in Windows.

The HTML export will create the same folder structure as that in the map store. A folder structure within the map store where path lengths approach the Windows limit can result in paths that would exceed such limits in the HTML repository.

Consider a Visio file, MyMap.vdx, which contains a page, MyPage-1. When this file is exported to HTML, files such as the following are created:

MyMap.MyPage-1_files\

arrow.gif

data.xml

filelist.xml

find.js

frameset.js

fullpage.gif

gif_1.gif

gif_1.html

gif_1.js

go.gif

keys.js

main_2.html

maximize.gif

minimize.gif

minus.gif

panminus.gif

panplus.gif

plus.gif

tick-foc.gif

tick-off.gif

tick-on.gif

toc.gif

toc2.gif

toolbar.html

visio.css

vml_1.emz

vml_1.html

vml_1.js

widgets.html

zoom.html

MyMap.html

MyMap.MyPage.html

Files and folders are created with names based on the map and page names.

Using the above export as an example, the longest path would be that of:

MyMap.MyPage-1_files\widgets.html

(and other files with the same path length.)

created from:

MyMap.vdx

Solution:

Ensure paths are sufficiently short to avoid the issue. Consider the following:

Shorten folder names

Avoid deeply-nested folder structures

Shorten file names

Shorten page names

The maximum path length (including the file name) has been found to be 256 characters. It's recommended that paths should be kept comfortably within this limit to avoid problems.

Note that if folders, files and pages are renamed, links (including drill-downs) within those maps, or maps that link to them, may need to be amended.