Start a discussion

1165 views
3 replies

Folder Redirection - 256 char limit issues

I've enabled folder redirection and am almost done with the migration but I'm running into this issue. I thought that copying the old server folder redirection folder to the new server would stop this? What can I do to get this working? Long log on time then it tells me it failed to redirect documents due to the long path issue.

This is a really big issue for me as I'm sure almost all of my users are terrible about using short file names. When they come in tomorrow I'd like to be able to reduce the log on times for them.

Thank you!

Tim Badtke Tim Badtke
Published 07/04/2019 22:25
Add Comment
Mariette Knap

Tim,

Yes, it will fail if the total length of the file name and that included folder structure exceeds 256 characters. That is a limitation of the OS and there is nothing you can do about this. You must shorten the path/file names. We are not talking about 8.3 file names but here is more on the subject of long filenames https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file.

You may have some luck with this https://blogs.msdn.microsoft.com/jeremykuhne/2016/07/30/net-4-6-2-and-long-paths-on-windows-10/

Bottom line is that you need to shorten the path. Here is a Powershell script that lists those files:

Get-ChildItem -Recurse -Force -ErrorAction SilentlyContinue | Where-Object {$_.FullName.Length -gt 255}

The way to shorten the files you found is to either use 'subst' or mount the folder location to a drive as deep as you can get in the folder structure.

replied 07/05/2019 11:50
Mariette Knap

If you need more support with this let me know and I will push this issue into Premier Support.

replied 07/05/2019 11:52
Mariette Knap

For other reading this...it seems that this limitation has been removed by Microsoft in Windows 10 version 1607 but you need to enable that with:

REG ADD "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem" /v LongPathsEnabled /t REG_DWORD /d 1 /f

The above command needs to be run from an elevated command prompt.

replied 07/05/2019 12:02
Last Activity 07/05/2019 12:02