Go shallow on your directory structure for file servers

When you design the local directory structure on your file servers, it’s a good idea to go shallow i.e. don’t create a deep directory structure like:

E:\Contoso File Servers\Server12\Data Folders for Employees in Downtown Vancouver Office\Sales and Marketing Department\Sales and Marketing Users

and then share the Sales and Marketing Users folder. The reason this is a bad idea is that one of your users might create a deep folder structure of their own within the shared folder, perhaps something like this:

Tony Allen\Sales Forecasts for Project Fabrikam\Projections\2008\September\First Draft

and then Tony might add a document like this to his First Draft folder:

Fabrikam Project Sales Projection for September 2008 Draft Version 1.1.docx

What’s wrong with this scenario? Well, from Tony’s perspective, the full path to his document would be:

\\Server12\Sales and Marketing Users\Tony Allen\Sales Forecasts for Project Fabrikam\Projections\2008\September\First Draft\ Fabrikam Project Sales Projection for September 2008 Draft Version 1.1.docx

From Tony’s perspective, the full path to his document is 200 characters long, and this is within the 255 character limit supported for paths in Windows Explorer. But what if Tony left the company and you as administrator needed to move his files to a different on the file server? The problem now is that from the perspective of the file system on the file server, the full path to Tony’s document is this:

E:\Contoso File Servers\Server12\Data Folders for Employees in Downtown Vancouver Office\Sales and Marketing Department\Sales and Marketing Users\Tony Allen\Sales Forecasts for Project Fabrikam\Projections\2008\September\First Draft\ Fabrikam Project Sales Projection for September 2008 Draft Version 1.1.docx

This path is 309 characters long, which exceeds the supported path length for Windows Explorer, and this means that if you try and copy or move the file, you’ll get a Windows Explorer error saying that the path length is too long. There are ways of working around this problem—Robocopy for example supports over-long file paths—but they add some frustration to your job as administrator. And there’s no way to prevent users from exceeding the path length limit on the local file system when accessing it remotely through a share, and neither is there a way of extending the maximum path length supported by Explorer as this is hard-coded.

So to make your life a bit easier, avoid sharing deep folders on your file servers in the first place.

Insider: How the basic tech behind the Internet works
Join the discussion
Be the first to comment on this article. Our Commenting Policies