none
How to copy long path files

    Question

  • Hi,

    How to copy long path files ? I tried with tera copy software still its error.

    Os ; Win2008rr std  & win 2003 Server & win 2012r2

    Sunday, October 18, 2015 6:14 AM

Answers

All replies


  • Hi mujeebuddin,

    Thanks for your post.

    For your server 2008r2 and server 2012r2,  please install the hotfix to check if it works now.(server 2003 has stopped support by microsoft, thereis no more related hotfix now)

    A file copy operation fails when files or folders have long paths in Windows Explorer

    https://support.microsoft.com/en-us/kb/2891362

    And you may try to use VBScript as discussed in the following thread(it requires a drive letter)


    https://social.technet.microsoft.com/Forums/scriptcenter/en-US/888256be-4e72-4656-88ba-bcca7d7b29e0/how-to-list-long-file-names-and-paths-longer-than-260-characters-in-vbscript?forum=ITCG

    Besides, you might consider using ROBOCOPY in a batch file.The Robocopy command line utility, which is natively deployed with Server 2008 and server 2012, will overcome the Windows API limit and allow the copying of files / folder paths longer than 255 characters.

    https://technet.microsoft.com/en-us/library/cc733145.aspx

    For other third party software, you may need to contact related vendors.

    Best Regards,

    Mary Dong


    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com.

    Monday, October 19, 2015 3:03 AM
    Moderator
  • Try to rename the file when copying , please note that the whole full path is considered while calculating the length as well. So try to keep it directly on C:\ or D:\ etc.

    Copy "longfile3423423423423.txt" "C:\Short134.txt"


    Regards,

    Satyajit

    Please “Vote As Helpful” if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

    Monday, October 19, 2015 8:26 AM
  • HI,

    I have 500gb data on d drive  (win 2008r2 std 64 bit) which i need to copy on USB External Drive. I tried services pack and hotfix still unable to copy long path files.

    Please help me on this 

    Monday, October 26, 2015 11:51 AM
  • HI,

    I have lot of folders ,i cant not rename it all

    Monday, October 26, 2015 11:51 AM
  • Create a share somewhere in the path - e.g. half way into the path, then reference the path through the drive letter

    e.g. if your path is E:\a\b\c\d\e\f\g\h\i, then share folder d and then map a drive letter to it. Then use this drive letter for your file copy.


    • Edited by zxxzxx Tuesday, October 27, 2015 6:49 PM
    Tuesday, October 27, 2015 6:45 PM
  • Hi Mujeebuddin,

    Atleast give it a try and let me know, if it works. If yes, we can think up how to do it in bulk.

    Please note, there is no alternative than renaming them, be it manually or automatic.

    There are some tools available that you allow you to do that.

    Try RoboCopy

    How to prevent long file name error copying from an external drive?


    Regards,

    Satyajit

    Please “Vote As Helpful” if you find my contribution useful or “Mark As Answer” if it does answer your question. That will encourage me - and others - to take time out to help you.

    Wednesday, October 28, 2015 4:13 AM