Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I sometimes found that when using simple right-click and copy-and-paste, some files/directories are not copied completely or not at all, because of various reasons, such as some saved webpage files/directories have some strange characters in their names or their names are too long.

For example,

in Windows 7, I save this webpage http://www.howtogeek.com/howto/windows-vista/working-around-windows-vistas-shrink-volume-inadequacy-problems/ completely in a very deep directories whose parent directories may have long names, I cannot copy its top ancestry directory, as Windows complains the filename for the saved webpage directory is too long.

In Ubuntu, sometimes I can save a file with some special character such as newline under some directory. But when I copy that directory, it will say the file name has some special character and I will have to manually remove the character.

Such cases are complained in both Windows and Ubuntu. I was wondering what some better ways to accomplish the copy job in both Windows and Ubuntu. For example, will archiving all to be copied into a single archive help? If yes how to do that?

Thanks and regards!


share|improve this question
    
..strange characters in their names .. and names being too long.. can you elaborate on that? are you supposed to have strange chars or very long filenames? can you give some examples? –  barlop Feb 11 '11 at 14:42
    
@barlop: for example, in Windows 7, I save this webpage howtogeek.com/howto/windows-vista/… completely in a very deep directories whose parent directories may have long names, I cannot copy its top ancestry directory, as Windows complains the filename for the saved webpage directory is too long. In Ubuntu, sometimes I can save a file with some special character such as newline under some directory. But when I copy that directory, it will say the filename has some special character and I will have to manually remove it. –  Tim Feb 11 '11 at 15:23
add comment

2 Answers

There is a 255 char limit on file paths, with windows explorer.. I might've heard of people using norton commander to do it but not sure. Maybe other copy programs too. If teracopy can then fantastic 'cos that's a great third party copying program extremely natural to use.

You could use subst

C:>subst j: c:\v

where c:\v is to be replaced by some long parent directory. Then at least you can access the subdirectories and the whole path is shorter, you can copy stuff.

share|improve this answer
    
Thanks! I was wondering the 255 char limit is put on the name of a file/directory, or the path of the file/directory i.e. including the names of all ancestry directories? –  Tim Feb 11 '11 at 18:22
    
the path. a quick check.. shows it's 255 once removed backslashes you can try creating very long directory names see how far it goes. then a file at hte end and keep increasing the name of the filename. One issue is creating the file with right click "new text document.txt" can be too long.so i tried creating the file of length 1 from cmd.exe with copy con a (enter file contents then end with ctrl-z).indeed,255 char limit when backslahes removed. so the full path will be a bit over 255.can copy/paste directory names into notepad to put the full path in notepad and it sys length(col) –  barlop Feb 12 '11 at 17:22
    
i'm not eure whether that includes or excludes backslashes 'cos I got a slightly mixed result. But it is the path that has the 255 limit. Anyhow, here's a question/answer on it stackoverflow.com/questions/1065993/… –  barlop Feb 12 '11 at 17:28
add comment

I use TeraCopy to copy large groups of files as it lets me know when errors have occurred and on what files. It will also continue copying your files even if some fail so that you can go back and look at the log of failed files and figure out a fix.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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