The MS-DOS sub-system uses COMMAND.COM, which has a 128 character input buffer.

Actually, the maximum variable length is 127 characters, as the end-of-variable character takes 1 byte.

This limits the PATH environment variable to 122 characters, as PATH=  uses 5 characters.

To work around this limit, you can do any of the following:

1. Use short folder names. 

2. Use batch files that modify the PATH based on the application.

3. Use batch files that use fully qualified names.

4. If you have only one partition, eliminate the drive letter from the path.

5. Use the subst command to create drive letters for long path strings.