Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.
Status
Not open for further replies.

hajime

macrumors 604
Original poster
Jul 23, 2007
7,949
1,315
Hello, when I tried to copy files from one drive to another by drag and drop, Windows sometime gave a message saying that the files could not be put in the destination folder due to long filenames. However, I cannot tell which files they are and their locations. The opitions I had was to cancel the copying or skip copying those files. I could be copying files from linux or Windows to the Windows 7 64-bit partiion on my MBP 2010. What can I do to copy all the files even they have long file names?
 
Unless you use a filesystem which could support long file names, the only choice is to dig into each file, shorten the file name and try copying them again.
 
The file system supports incredibly long names. I don't remember the limit, but it's in the tens of thousands of characters. However, Explorer (the GUI you are using when doing a drag and drop) only supports 256 I think.

So don't use the GUI. Copy files by command line.

If you're not comfortable copying at the command line, ZIP the entire file and folder structure first. All of the complex folder structures and filename lengths will be "hidden" by being contained in the ZIP file. Then copy the ZIP file over, then unzip it.
 
I often have two issues in moving files from one drive to another via drag and drop. 1. The file names are too long. It seems that in addition to my files (perhaps created in unix/linux), there are some strange files in my HD. For instance, something like abc123429bfjdkjfdsjfs3328989328jflsjfd. Perhaps Windows created those files? 2. In the middle of, copying, I got can't copy due to permission error.

For long filenames, somebody suggested compressing the files before copying. Does that mean just compress the entire drive and drag and drop the compressed .zip file to another drive?
 
Weird filenames like you describe are typically autogenerated temporarily files like caches, databases, etc. Or it could be corruption or even malware.

But none of this is really making any sense. What exactly are you trying to do?

If you are trying to move/copy personal files, such as documents, pictures, videos, etc., they they should have normal names and should copy easily.

If you are trying to move/copy installed software, this isn't going to work, especially between two different operating systems. You should reinstall the software.

And temporarily files like caches and whatnot are not meant to be moved either.
 
But none of this is really making any sense. What exactly are you trying to do?

I took out internal drives of old PC, plugged them to my Mac under Windows 7. Created a desktop folder, say "From old drives". Then, created a folder for each old drive (e.g. FromOldPC1, FromOldPC2, etc.) Open each old drive icon, drag and dropped "everything" to either my Mac or another larger capacity drive connected to the Mac.
[doublepost=1461896690][/doublepost]A typical old drive contains: WINDOWS, My Downloads, Program Files, Documents and Settings. So, do you mean there is no point to copy the WINDOWS and Program Files folders? What about the "All Users" folder in the Documents and Settings folder?

I just tried to use WinRAR to compress My Documents folder. I got a list of specified path cannot be found errors. Don't know what that means. Those files were made when I was using UNIX systems many years ago.
 
Last edited:
WinRAR does not work. Got lots of error when I tried to decompress the file. These are related to files stored in subfolders of about 10 levels down. Any other way to copy my old HD without getting those long filenames and cannot find specific path errors?
 
Have you checked the source computer's file system for errors?
 
Thanks for the suggestion. How?

disk utility, repair disk
[doublepost=1461931577][/doublepost]
Thanks for the suggestion. How?
[doublepost=1461931488][/doublepost]

Thanks. What do you mean?

exFAT is a new file system that supports long file names and apple and windows can both read and write to it.

try erasing the target disk and select exFAT, and see if that allows you to copy the files you are having troubles with
 
I took out internal drives of old PC, plugged them to my Mac under Windows 7. Created a desktop folder, say "From old drives". Then, created a folder for each old drive (e.g. FromOldPC1, FromOldPC2, etc.) Open each old drive icon, drag and dropped "everything" to either my Mac or another larger capacity drive connected to the Mac.
[doublepost=1461896690][/doublepost]A typical old drive contains: WINDOWS, My Downloads, Program Files, Documents and Settings. So, do you mean there is no point to copy the WINDOWS and Program Files folders? What about the "All Users" folder in the Documents and Settings folder?

Yes, I can't think of any purpose for that, which is why I was asking why you were doing that.

You do want to copy folders with any of your personal files that you would like to access, such as office documents, images, videos, downloads, Turbo Tax save files, anything you've created, etc. But the other stuff won't be useful in any way that I can think of, and isn't really meant to be copied wholesale this way onto a different computer and operating system.

By trying to file copy the whole drive, you're definitely including useless temporary files like caches and whatnot. Those are the ones you mention with the very long gibberish file names.
 
By trying to file copy the whole drive, you're definitely including useless temporary files like caches and whatnot. Those are the ones you mention with the very long gibberish file names.

Yes. You are right. Thanks.

Copying files that are about 8 level deep (subfolder of subfolder of....) also have problems even I tried to compress the top level folder before copying. I don't know how to solve this problem yet.
 
disk utility, repair disk
[doublepost=1461931577][/doublepost]

exFAT is a new file system that supports long file names and apple and windows can both read and write to it.

try erasing the target disk and select exFAT, and see if that allows you to copy the files you are having troubles with

By target disk, do you mean the disk where I want the old files to copy to? It is the Windows 7 partition on my MacBook Pro. I cannot erase it.
 
Thanks for the suggestion. How?
If you're copying FROM windows, then you need to run chkdsk, from linux, what ever it uses, for OS X, then Disk Utility.

You mention all three operating systems, so I don't know where the files exist (linux/win/OSX)
[doublepost=1462015672][/doublepost]
By target disk, do you mean the disk where I want the old files to copy to? It is the Windows 7 partition on my MacBook Pro. I cannot erase it.
Target - the destination of where you want to copy the data too.

Get yourself an inexpensive thumb drive, format it to exFAT and copy your files to that.
 
If you're copying FROM windows, then you need to run chkdsk, from linux, what ever it uses, for OS X, then Disk Utility.

You mention all three operating systems, so I don't know where the files exist (linux/win/OSX)
[doublepost=1462015672][/doublepost]
Target - the destination of where you want to copy the data too.

Get yourself an inexpensive thumb drive, format it to exFAT and copy your files to that.


Formatting to exFAT seems to have solved the problem. I used to have over 1000 files with long filenames. Now it came down to about 10 which I could manually select whether or not to delete.

Thanks all for the suggestions.
 
When I copied from another old drive. I got two strange issues:

1. Again, long filename. Windows showed Support_main_flash, 03E6TREE as the files having the problem. The names are not long. Why it says that there is a possibility that the filenames are too long for the target folder, move to a location with a shorter path name? There are about 2000 of those files.

2. Some of the property of the file will not be copied. What is that?

I found it annoying that after waiting up from sleep or coming back from work, the copying process was halt waiting for me to tell Windows what to do.
[doublepost=1462669032][/doublepost]
 
When I copied from another old drive. I got two strange issues:

1. Again, long filename. Windows showed Support_main_flash, 03E6TREE as the files having the problem. The names are not long. Why it says that there is a possibility that the filenames are too long for the target folder, move to a location with a shorter path name? There are about 2000 of those files.

2. Some of the property of the file will not be copied. What is that?

I found it annoying that after waiting up from sleep or coming back from work, the copying process was halt waiting for me to tell Windows what to do.
[doublepost=1462669032][/doublepost]
TreeSize is a graphical file manager that highlights directory trees with file paths longer than 255. https://jam-software.com/treesize_free/manual.php It also reports directory tree sizes, to make it super fast to find pig files.

Your problem, if you're trying to copy the files on a windows system disk, is likely due to the fact that a windows system disk has infinitely long filenames under some of the directories.
http://answers.microsoft.com/en-us/...robocopy/20f32f0c-4cb9-4125-923d-6a57e4d27232
 
Last edited:
I still don't understand what you are trying to do. Yes I know you're trying to copy files, but I mean, ultimately what are you trying to do?

Simply trying to copy a whole OS drive into the existing folder structure of another OS via drag and drop file copying is just not something that has any purpose that I can think of. It's also fraught with problems, as you are experiencing, because it's not meant to be done.

So can I ask what you are ultimately trying to do? Create a restorable backup? Have access to your documents? Because this isn't the right method for going about those tasks.
 
Over the past 20 years, I have about 20 hard drives. As I am moving country, I want to store all the stuffs to these drives to as few lightweight hard drives as possible. Note that some of these drives contains files from linux. Also, they contain backup files made by software like Norton Ghost, Patagon, etc.

One thing I am confused is that I reformatted the new Lacie drive 2TB to exFAT. It has 1.8TB available. The source drive has used only 1.14TB according to the property. When I tried to copy a big folder which contains contents of several hard drive from the 1.14TB drive to the 1.8TB drive, Windows failed to copy and reported that I do not have enough space in the Lacie drive. How come?
 
Basically you're going about this all wrong. If you keep trying to use this method, you will continue to have problems. There is no way around it other than to change methods.

This sort of stuff just isn't meant to be copied in this way. There is metadata such as file attributes and permissions that won't get copied correctly. Not to mention there are probably hidden files that aren't copying at all, and as you've discovered, folder structures and file names that are just too long.

I can't suggest the exact way to copy the data, because I still don't know what you are trying to do with the archived data. But, here are some common examples:
  • You want to be able to access your documents, photos, etc., on a different computer -> file copying is fine, but copy only those folders with the relevant documents, not the whole drive.
  • You are making a complete system backup for a computer including all of its software so that later you can restore that complete system to that same computer -> make an image of the drive, or a whole system backup (don't use drag and drop file copy). There is software for doing a complete image backup.
  • You are making a complete system backup for a computer so that later you can restore that complete system to a different or newer computer -> that won't work for Windows and I don't think Linux either, but it will for OS X and Macs. So if this is for OS X, then do a complete image backup like bullet #2.
 
Over the past 20 years, I have about 20 hard drives.
Have you looked at, or needed the data from any of those 20 hard drives? Seems like an excessive amount of hard drives and data.

I'd go with @ActionableMango said in his first bullet. Go through your hard drives, determine what you want to save and that copy them to a single drive. I'm pretty sure you can easily cull the amount of information you need to copy.
 
Thanks all for the suggestions. I am pretty screwed up all these years.

For the backup utility built in Windows 7, is it only for recovering on the "same" hardware. Am I right?
 
Thanks all for the suggestions. I am pretty screwed up all these years.

For the backup utility built in Windows 7, is it only for recovering on the "same" hardware. Am I right?
This link seems to indicate that you can. I've never used the windows backup method, so I can't confirm or deny the issue but MS appears to be saying you can
 
This link seems to indicate that you can. I've never used the windows backup method, so I can't confirm or deny the issue but MS appears to be saying you can

Thanks for the info. Sometimes it is better to get real user experience than what the manufacturer says.
 
Status
Not open for further replies.
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.