Need help working from home with your Bentley software? We're here to help - click here

Error when opening model files: The specified path, file name, or both are too long.

Product(s): WaterGEMS, WaterCAD, HAMMER
Version(s): CONNECT Edition
Area: Modeling

Problem

An error message is generated when trying to open a model: 

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.

at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
at System.IO.Path.InternalGetDirectoryName(String path)
at Haestad.Drawing.UI.Integration.Support.RecentDocumentsCollection.ReplaceItems(IList textItems, IList tagItems)
at Haestad.Support.Storage.SimpleSettingsFile.Instantiate(Object[] aarrayArg)
at Haestad.Framework.Application.RecentDocumentsListManager.FromDirectory(String asDirectory, IMenuItemEditor aeditor, Int32 aiRecentFilesMax)
at Haestad.Framework.Windows.Forms.Forms.HaestadParentForm.InitializeRecentDocumentsManager()
at Haestad.Framework.Windows.Forms.Forms.HaestadParentForm.SaveRecentFiles()
at Haestad.Framework.Windows.Forms.Forms.HaestadParentForm.SaveSettings()
at Haestad.Drawing.Control.Forms.GraphicalDrawingParentForm.SaveSettings()
at Haestad.Framework.Windows.Forms.Forms.HaestadParentForm.HaestadForm_Closing(Object sender, CancelEventArgs acea)
at Haestad.Drawing.Control.Forms.GraphicalDrawingParentForm.HaestadForm_Closing(Object sender, CancelEventArgs e)
at System.ComponentModel.CancelEventHandler.Invoke(Object sender, CancelEventArgs e)
at System.Windows.Forms.Form.OnClosing(CancelEventArgs e)
at System.Windows.Forms.Form.WmClose(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Solution

First, try doing a clean reinstallation of the product. 

Another thing you can try is to save the model to a shorter file path. One test you can try is copy the model files to the Documents folder or the Desktop.

  • Created by Bentley Colleague
  • When: Tue, May 14 2019 3:32 PM
  • Revisions: 1
  • Comments: 0
Recommended
Related