When working with SyncroSim on Windows, users may run into a ‘file path is too long’ error, such as the following:
[Failure] 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.
While these character lengths are specific to Windows, other operating systems have their own file path length limits. We offer a few different solutions to this issue below:
- Enable long path support on Windows using the Registry Editor by following these steps.
- Move the library to a new location with a shorter file path (ex. C:/nameOfLibrary.ssim).
- Set custom folders for your library in the SyncroSim User Interface:
- Open the Library Properties window by double-clicking on your library;
- Navigate to the SyncroSim Core tab, and click on the Folders node;
- Set custom folders for where library data, publish, temporary, and/or backup files are saved. Note that temporary files are those created during a simulation and when publishing a library; if this error appears in the run log after running a scenario or while attempting to publish, it is likely these files that need shorter file paths. This is especially the case when multiprocessing.
Note that the length of the library name affects the length of file paths created by SyncroSim as well. Whenever possible, we recommend using shorter library names to help avoid running into this issue.