File name "not valid or too long" when copying a file?

Matt Hamilton
  • File name "not valid or too long" when copying a file? Matt Hamilton

    I have a document library which contains some Word documents that I'm trying to copy down to my local disk. I've opened the document library using Windows Explorer, and am dragging the individual files from that window to a folder on my local PC.

    Some files work, but others are giving me this error (on Windows 7 x64):

    The file name you specified is not valid or too long. Specify a different file name.

    The filename in question is simply "Donations Policy.docx" - it's not a long filename. I've even tried simply dropping the file into the root of my D drive to see if it's the destination filename it's complaining about, to no avail.

    On Windows XP the error is a bit more cryptic:

    Cannot copy Donations Policy: Cannot read from the source file or disk.

    Has anyone seen this error? I can't for the life of me determine why some files are throwing this error while others are copying just fine.


    The files copy without any problem if we go into the doc lib's settings and turn off versioning.

    The error must somehow be related to versioning, but the versions of these documents are not consistent with the error. Documents with versions less than one (eg 0.6) copy fine, others with versions like 1.2 are fine. My "Donations Policy" file is version 1.8 and it errors.

    So for now we're working around it by turning off versioning for the duration of the file copy. I'd still love to hear from others who might be able to explain the error!

  • how deep down in your site/folder structure is the document located? Make sure that the Url to the site, doclib and folders and file are not longer than 256 characters.

  • It may be a coincidence that the files with the higher version numbers are the ones giving the error.

    Is the pattern that files with a space in the file name give an error, but files without a space are OK?

  • I'm going to provide my own "answer" to this question to effectively close it off, because the problem is no longer occurring and I'm not 100% sure what fixed it.

    All I know is that (temporarily) disabling versioning on the document library made the problem go away. After we were done copying the files, we turned versioning back on and it still didn't error. So I think right now it's anybody's guess.

explorer libraries document
Related questions and answers
  • I have a list, with a list item that contains an attachment. I was horrified to see that the link to the attachment doesn't work if the attachment file name contains a space. I'm amazed that SharePoint will even allow you to store file names with spaces, if it doesn't know how to handle them correctly. Is there some kind of server setting that you can set to "Handle attachment file name spaces" correctly? Or is this a known limitation with Sharepoint? If yes, please tell me this issue is fixed in 2010? Update I've narrowed it down to " +" in the filename a space directly followed

  • So I recently had a nice hitch in the SharePoint app I made for my client. We have a Document Library which is supposed to contain PDFs, converted from drawing files made in other programs. The test... situation. Because this is a real field test, I cannot simply upload the new PDF file and run it through the process, I need to maintain the field data from the original file, in all of its versions... of things, but naturally I failed to take into account user-based errors. The testers uploaded a file in its normal file format instead of converting it to PDF first. And it's already passed through

  • failed. The login is from an untrusted domain and cannot be used with Windows authentication. UPDATE Switching to mixed mode authentication (?) on SQL fixed these problems. I then ensured a bunch...) the synchronization service. The original errors are back, though BOTH the FIM services are started on the APP server. UPDATE From the ULS, this seems to be the error that is my plague. 07/09/2010 13:09... is enabled on the DCs and clients. So is local DTC access. I've even gone as far as to create a HOSTS file on the machines pointing to the right servers.

  • " status. There are no errors or warnings in the Windows event log, and none that I can find in the SharePoint trace logs. Of the 42 PDF files in this folder, all are less than 5MB in size and most... in the PDFs -- Adobe Reader's Find command works fine within a given document. What could be causing the content not to be indexed? ...It appears that there's at least one folder in one of our crawled network shares that's not getting indexed properly, as evidenced by searching for unique words known to be in PDF documents

  • I am working on writing up a concept for hosted Windows SharePoint Services environment through FPWeb for a potential customer. Here's my scenario. Using a basic package (cheaper) to start off with, my customer wants to allow her customers to log in to simply swap files with her. Of course each customer should only see their own files. Also, my customer wants SharePoint to be themed to match her website. Since we're starting off with the basic package I cannot install my own custom WSPs to handle this, instead I have to rely on SPD and out of the box SharePoint functionality. My issue

  • Another question about the Very Large List I referenced in this question: http://sharepoint.stackexchange.comquestions/445/deleting-old-versions-in-a-document-library This Document Library has over... Web Services to move the documents. The Copy Web Service copies the docs just fine, but we want to preserve the Created and Created By column values if at all possible. I've tried to set... to preserve the Created and Created By column values just fine. Turns out that the last hurdle is unlinking the copy from its source. I can't figure out a way to empty out the _CopySource column

  • I have a Very Large List (~5000 documents) which has been chugging along for about a year. It has had versioning turned on, with major versions, keeping 2 old versions. We're totally restructuring the Document Library (more on that in another question) and I'd like to simply get rid of the old versions across the board to clean up the library and regain space. I've turned versioning off, but the versions don't go away, when I think they should. Any thoughts? One thing it's important to note is that I inherited the Document Library. It is a little odd in several ways and I'm not exactly

  • When opening a document from a documentlibrary in Word/Excel/Outlook the FileOpen Dialog shows all the files in the document library. I have a lot of documents in there, with metedata in columns. How do i show those extra columns (in the fileopen/save dialogs), and how do i enable filtering of those columns? Just finding my file based on only the filename is hard, using the metadata would be a great improvement.

  • The definition of the 'View Only' permissions level is as follows: Members of this group can view pages, list items, and documents. If the document has a server-side file handler available, they can only view the document using the server-side file handler. What is considered to be a server-side file handler in the context of SharePoint? Is this an HTTPHandler? What technology is it based on, how do I write one?

Data information