Working with Long File Paths
Ignition's data folder structure can lead to long file paths that may require special consideration when working with tags, Perspective view layouts, and external resources to manipulate files. These long files paths can cause problems especially for Windows user workflows, such as when backing up directories and not all files being copied over completely since Windows API has a filepath limit of 255 characters. Additional issues may also occur with other applications that do not accommodate for long filepaths.
Interacting with tags will be the most common way long file paths may lead to issues, as the JSON files are stored with the starting length of the C:\Ignition\8.3.0\data\config\resources\core\ignition\tag-definition
directory. This is made more likely when working with certain modules, like MQTT, which creates names dynamically.
It is important to verify your system and application limitations because depending on the actions you're trying to take, an error message may not appear upon failure and everything may seem to be functioning correctly. This page details some inconsistencies to watch out for and troubleshooting tips.
LongPathsEnabled Key​
To help mitigate this limitation, you can open the Windows Registry Editor and set the LongPathsEnabled
key to 1, which will remove the Windows API 255 character restriction. This key is located within the Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
folder.
Be aware that even with the LongPathsEnabled
registry setting enabled, file management tools may still run into issues.
When LongPathsEnabled
is NOT Enabled​
Explorer
- Copying
tags.json
that exists in a >256 path length will result in a file namedTAGS~1.JSON
or something similar. It can be renamed if it is pasted into a folder that allows for a <256 path length. - You can paste into directories with >256 path length.
- Folders cannot be modified and renaming is not possible when the file path is >256. To rename you would need to:
- Copy the file to a location that is <256 path length.
- Rename the file.
- Copy the file.
- Paste it into the >256 path length directory.
Command Prompt
You will be unable to perform any actions on files or directories that are >256 path length. You will instead see an error message stating The system cannot find the path specified
when trying to get to the folder.
Git
The following warning will occur that prevents committing changes:
warning: could not open directory 'ignition/tags/default/20240821_163032_42_ARP5PD6DM59W4MHW47VD3WS/20240821_163032_160_P85NL0PQZEJWPAI1DK1NICW8WCYTKO2O387131RU4L32BPMKXS7M5147H1DBWXFS8Q70O074AV7NUKJAVLBAGWVB8AZ5RDUZ13SD03WTYQTFENHKKV52KR1BHQQ33S5LSAWPB0E5FDOX/': Filename too long
When LongPathsEnabled
is Enabled​
Be aware that even with the LongPathsEnabled registry setting enabled, file management tools may still run into issues, and even Explorer will still have some problems working with files.
Explorer
Enabling the LongPathsEnabled
key does not impact the issues identified above when working with Explorer.
Command Prompt
No limitations.
Git
With the LongPathsEnabled
key enabled, you can now take advantage of Github's core.longpaths
configuration setting. This setting is set to false by default, but when set to true, paths >260 will be supported. More about this setting can be found in the Git for Windows documentation.