Avatar of Server Guy
Server Guy
Flag for United Kingdom of Great Britain and Northern Ireland asked on

How to prevent users from exceeding the long file path name limit

Hi,

Our terminal server users are constantly naming files with names that exceed the long file path name limit which then prevents users from accessing or moving the file. We are currently only able to react to the issue after the naming has taken place, are there any proactive solutions that prevents or warns users when they attempt to name a file which will then exceed the long file path name limit.

Has anyone created any Powershell scripts which have resolved the above issue?
Powershell

Avatar of undefined
Last Comment
Server Guy

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Alex

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
oBdA

There's no solution for that, sorry. The real NTFS limit is way higher, otherwise users obviously wouldn't be able to store "too long" files in the first place (namely around 32000 characters, which is more than the average user is willing to type or even browse to).
The problem is "what actually is the file path length"? Well, "it depends" - again, otherwise users wouldn't be able to save files that other users won't be able to access.
There's the absolute file path on the server - that is usually already longer than what the user sees.
Then with access over shares, the path length to the same file will vary, depending on where the drive letter is mapped, or whether a UNC was used.
You'll need to educate your users, until Microsoft and all other developers will fix all their products.
Server Guy

ASKER
Thanks for you above comments, I will continue to investigate.
Server Guy

ASKER
Will continue researching whilst educating our users.
Your help has saved me hundreds of hours of internet surfing.
fblack61