I know this is strange and I have spent almost 3 days searching for the solution online without getting a useful one. So I have decided to come here.
I have recentl
In addition to the answer of Swapnil, note that you can modify the maximum length of the Path variable - which is otherwise limited to 2048 characters (while a single path has an historical limit of 206 characters).
In Windows 10, you achieve this by setting the LongPathsEnabled
registry key to 1, which can be found here:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem
To access the registry editor: Windows Key+R
, type Regedit
.
Source: https://superuser.com/a/1119980
Also take a look at this SuperUser answer: https://superuser.com/a/1119980/327009
Addressing the comment below: the error "Environment variable is too large" is related to the whole variable, not the single path currently being added.