Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Roaming profiles and 'cannot copy file due to filename or extension is too long'?

Posted on 2010-11-22
2
2,484 Views
Last Modified: 2012-05-10
We have a Windows 2008 R2 file server, and our clients are Windows 7 machines mostly. They are all in the same domain. I've noticed that an user has trouble with his roaming profile due to the filename or extension of files synced being too long. And this isn't exactly the first time either.

User Profile General - Event id 1509:

"Windows cannot copy file \\Synsrv1$NOCSC$\Synocus Users\KenI\Profile.V2\Documents\Visual Studio 2010\Projects\EmployeesVisualWebPart1\EmployeesVisualWebPart1\pkg\Debug\EmployeesVisualWebPart1\CONTROLTEMPLATES\EmployeesVisualWebPart1\EmployeesVisualWebPart\EmployeesVisualWebPartUserControl.ascx to location C:\Users\KenI\Documents\Visual Studio 2010\Projects\EmployeesVisualWebPart1\EmployeesVisualWebPart1\pkg\Debug\EmployeesVisualWebPart1\CONTROLTEMPLATES\EmployeesVisualWebPart1\EmployeesVisualWebPart\EmployeesVisualWebPartUserControl.ascx. This error may be caused by network problems or insufficient security rights.

 DETAIL - The filename or extension is too long."

I've checked for the file on our file server, and it's simply not there. Apparently it has never been synced to the file server, probably due to the filename or extension being too long.

The solution, as presented in a similar thread (http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Server/2000_Server/Q_22600828.html), is to create a new profile and copy all important content. Alright, that's doable...

However, I'm not looking for the quick fix, but rather to the cause of this issue. Is there any way to get rid of the 'filename or extension is too long' bug in the first place? As we cannot control the folders each application creates, I'm hoping to find a way to be able to copy long filenames and extensions.
0
Comment
Question by:Synocus
2 Comments
 

Author Comment

by:Synocus
ID: 34188185
Confirmed, the troublesome long filename files were never synced to the file server, and from that point on the profile sychronization started failing, and as the files were never removed they effectively made the user to keep running a profile that's stored locally only.

How can we prevent this issue from repeating?
0
 
LVL 38

Accepted Solution

by:
Hypercat (Deb) earned 500 total points
ID: 34192051
This is a limitation of every operating system that Microsoft has ever produced. It's not a "bug" but built into the design of the OS that the maximum path length is 255 characters. The problem is that the roaming profile location adds "\\synsrv$NOCSC$\Synocus Users\" to the path so that the final result is a path that is too long to be read by the OS. I have seen this happen numerous times and as far as I know there is no fix for it simply because it's not something that can be "fixed." The only other suggestion I could think of would be to somehow limit the original path to a shorter one. It seems like a very long and convoluted path in the first place, but I'm not familiar with Visual Studio so I don't know if changing that path perhaps through preferences within the application would be a possibility.
0

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A safe way to clean winsxs folder from your windows server 2008 R2 editions
By default the complete memory dump option is disabled in windows . If we want to enable the complete memory dump for a diagnostic purpose, we have a solution for it. here we are using the registry method to enable this.
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
This Micro Tutorial will give you basic overview of the control panel section on Windows 7. It will depth in Network and Internet, Hardware and Sound, etc. This will be demonstrated using Windows 7 operating system.

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question