1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Fixed copy from share error

Discussion in 'Support' started by TimButterfield, Feb 28, 2012.

  1. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    414
    Likes Received:
    2
    I copied some Visual Studio C# build output files from a share and experienced copy errors with some of the files.

    copy \\computer_name\share_name . /s
    1,422 files copied 101 failed

    The files with the error had a prefix added to the path resulting in the error.

    \\?\\\computer_name\share_name\dir1\filename.ext => D:\dest_folder\build_num\dir1\filename.ext

    TCC: (Sys) The filename, directory name, or volume label syntax is incorrect.

    Here is the distribution of C# build output file types that had that problem:
    • exe: 4
    • pdb: 17
    • dll: 74
    • config: 6
    Here are the totals for the files on that share:

    Total for: \\computer_name\share_name\*
    669,800,184 bytes in 1,523 files and 1,124 dirs 672,845,824 bytes allocated

    This error was experienced in TCMD and TCC/LE.

    TCC 13.03.47 Windows 7 [Version 6.1.7600]
    TCC Build 47 Windows 7 Build 7600

    TCC LE 13.03.45 Windows 2003 [Version 5.2.3790]
    TCC LE Build 45 Windows 2003 Build 3790 Service Pack 2

    When I copied from the share using Windows Explorer, there were no errors.
     
  2. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,036
    Likes Received:
    84
    Were any of the pathnames + filenames > 248 characters?
     
  3. JohnQSmith

    Joined:
    Jan 19, 2011
    Messages:
    559
    Likes Received:
    7
    Is that a limitation?
     
  4. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    414
    Likes Received:
    2
    Yes. Max len was 259.
     
  5. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,036
    Likes Received:
    84
    Not a limitation, but longer filenames have to have a "\\?\UNC" prefixed or Windows will reject the name.
     
  6. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    Could TCMD do this automatically when required?
     
  7. TimButterfield

    Joined:
    May 20, 2008
    Messages:
    414
    Likes Received:
    2
    In my error output, this prefix has already been added. But, it still failed to copy.
     
  8. Charles Dye

    Charles Dye Super Moderator
    Staff Member

    Joined:
    May 20, 2008
    Messages:
    3,358
    Likes Received:
    39
    Should the \\?\ really be prepended when the filename is already in UNC format?
     
  9. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,036
    Likes Received:
    84
    It already does.
     
  10. rconn

    rconn Administrator
    Staff Member

    Joined:
    May 14, 2008
    Messages:
    10,036
    Likes Received:
    84
    TCC will prefix "\\?\UNC" if a sharename is too long for the Windows APIs. But something (either somewhere else in TCC, some other app, or Windows) is prefixing the incorrect "\\?\" string instead (which should only be added to pathnames with a drive spec).
     
  11. Steve Fabian

    Joined:
    May 20, 2008
    Messages:
    3,520
    Likes Received:
    4
    As is the case so often, it's too late to ask Rex to do something - he has already done it. Thanks!
     

Share This Page