Create a directory with more than 260 characters

anyway, create a directory longer than 260 characters? I am using powershell and my code [io.Directory]::CreateDirectory(\\fileshare\$FolderStructure)

, but it stops creating folders when the path length becomes more than 260 characters. I tried adding \\?\

to the beginning but it didn't work

+3


source to share


1 answer


As mentioned in the comment, this is a known limitation (see here for a description of the bug and here for past workarounds). However, Microsoft has addressed this issue now in .NET 4.6.2 along with an update for Windows 10: see here for the latest documentation on partial file path restriction removal. It doesn't make sense to give a working example at this point as Microsoft changes parts almost every month. Anyone reading this answer will need to look at the latest documentation.



+1


source







All Articles