Windows, problem with long path/filenames

Hi experts
I cannot quite get my head around the Long path/filenames in windows.
I have searched a lot, but haven't found the exact answer to my question.
I have enabled the registry key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem\LongPathsEnabled = 1
an rebooted the computer

Why does file explorer not accept a path that is longer then the maximum lenght of 260(256) characters?
And is there something to fix this? And changing to linux is not an option :-)

Many thanks for advice.
Anker74Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Omar SoudaniSenior System EngineerCommented:
Which version of Windows are you using? And is it home or professional version?
Anker74Author Commented:
Windows 10 pro 1709
Omar SoudaniSenior System EngineerCommented:
Try to disable it using Local Group Policy Editor:

In start write:  gpedit.msc, and press Enter

In the Local Group Policy Editor, in the left-hand pane, drill down to Computer Configuration > Administrative Templates > System > Filesystem. On the right, find the “Enable win32 long paths” item and double-click it.

In the properties window that opens, select the “Enabled” option and then click “OK.”

You can now exit the Local Group Policy Editor and restart your computer.

Hope it works for you.
CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

Anker74Author Commented:
The thing is that something works and others do not.

For example:
I created a folder structure that is 248 characters long and now I cannot create a new folder in that directory. It says destinationpath is to long even before I able to write anything. In the same folder I can create a txt file but I am not give the option to name it.
If I open note and type something and presses save and try to give it a long name it simple cuts the long name down to 5 characters so the total path becomes 255 characters long.

???????????
Hello ThereSystem AdministratorCommented:
This is set by design. There is no solution for this, just workarounds.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247(v=vs.85).aspx

You can allow the path length up to 32k characters. You can use the win32 api and "\\?\" to use greater than 260 characters.
Hello ThereSystem AdministratorCommented:
Example:
The maximum path on drive D is "D:\ 256-character path string<NUL>"

*NUL represents the invisible terminating null character for the current system codepage.

D ... 1 character
: ... 1 character
\ ... 1 character
path ... 256 characters
NUL ... 1 character

1+1+1+256+1 = 260 characters
Hello ThereSystem AdministratorCommented:
The issue will be always present in Windows to keep compatibility with old software. Use the NT-style name syntax "\\?\D:\very long path" to workaround this issue.
In Windows 10 (Version 1607 - Anniversary Update) and Windows Server 2016 you have an option to ignore the MAX_PATH issue by overriding a group policy entry:
Computer Configuration -> Admin Templates -> System -> FileSystem -> Enable Win32 Long Paths
source

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Anker74Author Commented:
"The issue will be always present in Windows to keep compatibility with old software"
@MICROSOFT - please give the option to opt out of this backward compatibility ASAP :-)
Maybe in the future MS will listen to this issue and solve it. Giving an option of "\\?\D:\something" is not a solution for end users.

Thank you both for the comments.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.