I need to copy a very large directory from a linux server to a windows machine; the directory is very large and contains directories that go as deep as having 50+ subdirectories. So as you could probably imagine, Windows errors out when trying to copy the files over.

Is their any sort of script or existing program which could rename or move all the folders and subfolders withinin the main directory to something within 255 character limit as well as output a text file mapping the new names to the old?

migrated from stackoverflow.com Mar 14 '12 at 23:52

This question came from our site for professional and enthusiast programmers.

  • Have you tried rsync(1) yet? Neat tool. – sarnold Mar 14 '12 at 23:49
  • What 255 character limit are you referring to? How did you try to copy them? Drag and drop? scp? – David Schwartz Mar 15 '12 at 0:17

I suggest your better option is to zip the files in Linux and keep them zipped in Windows. Zip files can store long names and deep paths. Windows can browse a zip without any additional software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.