In Powershell I created a path, longer than the 260 character limit. E.g. a 305 character path as shown below.
cd /
mkdir A_100_____123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_
cd A_100*
mkdir B_100_____123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_
cd B_100*
mkdir C_100_____123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789_
cd C_100*
But Explorer does not let me.
If I try to insert or create a file with a path longer than 260 characters, I get: "The file name(s) would be too long for the destination folder. You can shorten the file name and try again, or try a location that has a shorter path. "
If I try to rename any file or folder with a path longer than 260 characters, I get "The file name you specified is not valid or too long. Specify a different file name.".
I ran into this because I had a script that happened to create a very long path, without being stopped from doing that. Is this an issue with Powershell? Or an issue with Explorer? Or perhaps neither?
I have a script that may create very long paths, and apparently nothing stops it from creating paths longer than 260 characters. My script is written in sh and running in WSL, but it could just as well have been written as a Powershell script.
Should I stop my script from doing that? If yes, is it then really my job as the script programmer to make such checks?
I'm running Windows 10 enterprise [Version 10.0.19045.3803].

