Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Can't Copy Files from one Windows Drive to Another (Long File Names)


  • Please log in to reply
14 replies to this topic

#1 chefelf

chefelf

  • Members
  • 12 posts
  • OFFLINE
  •  
  • Local time:01:21 PM

Posted 02 April 2018 - 10:10 AM

Hi, All,

 

I've encountered an odd issue.  I have a large amount of data on an older 1TB HDD.  I got a newer 2TB HDD and I simply want to copy everything from the older HDD (F:) to the new one (D:) and start working off of the new drive.  I though this would be pretty simple so I copy and pasted it and allowed it to transfer over night.

 

The following morning I got an error that it couldn't copy some files because the file names were too long.  I thought this was odd since the new file path should be the exact same length as the old (unless they're routing it through some TEMP path on the way).

 

Has anyone encountered this issue and know how to solve it?

 

Thanks in advance for any help!



BC AdBot (Login to Remove)

 


#2 JohnC_21

JohnC_21

  • Members
  • 24,311 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:02:21 PM

Posted 02 April 2018 - 10:15 AM

Does the hotfix work?

 

https://support.microsoft.com/en-us/help/2891362/a-file-copy-operation-fails-when-files-or-folders-have-long-paths-in-w



#3 Allan

Allan

  • BC Advisor
  • 8,617 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:New Jersey
  • Local time:02:21 PM

Posted 02 April 2018 - 10:44 AM

Also, you'd be much better off using disc imaging software. It's faster and faultless.



#4 hamluis

hamluis

    Moderator


  • Moderator
  • 56,131 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Killeen, TX
  • Local time:01:21 PM

Posted 02 April 2018 - 12:37 PM

You cannot simply copy/paste program and system files...as noted above, you need to use backup/umaging software.

 

You say "data files", which would mean all files other than program and system files.

 

What program did you use for this "transfer"?

 

Louis



#5 chefelf

chefelf
  • Topic Starter

  • Members
  • 12 posts
  • OFFLINE
  •  
  • Local time:01:21 PM

Posted 02 April 2018 - 01:44 PM

Thanks, Everyone.  There are no system files or installed programs on this drive, it is simply a storage drive for files and projects (mostly audio).  Windows is up to date.

 

I'm not using any software to do this (other than Windows Explorer) and I've never encountered this issue before.  Is there other software I should be using?  I've done similar copy/pastes of storage drives over the years dozens of times with no issues.

 

Thanks again for all your help!



#6 hamluis

hamluis

    Moderator


  • Moderator
  • 56,131 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Killeen, TX
  • Local time:01:21 PM

Posted 02 April 2018 - 02:22 PM

Your title assertion...."long filenames error"...is typically avoided by using filenames that are sufficiently short and identifiable for file contents.

 

The typical exception to such naming, in my experience, would occur with temporary files.

 

Were the files with "long filenames" identified by Windows?  Please...post the exact content of the error message you viewed.

 

Louis



#7 chefelf

chefelf
  • Topic Starter

  • Members
  • 12 posts
  • OFFLINE
  •  
  • Local time:01:21 PM

Posted 02 April 2018 - 03:00 PM

Okay, I'd have to attempt the transfer again.  I let it go overnight since it was a lot of files.  I can't imagine there'd be any temp files as this was all just storage.

 

Any ideas how it's possible that the filenames could exist on one drive but not be able to be copied onto a second?  It should be 1:1 file structure except for the drive letter.



#8 Guest_Joe C_*

Guest_Joe C_*

  • Guests
  • OFFLINE
  •  

Posted 02 April 2018 - 03:12 PM

 

In this scenario, the behavior of the copy operation is unreliable and fails because of the length of the file or folder path. Additionally, you may experience one of the following symptoms:

  • The copy operation fails and generates a message that states that the path (file name) is too long. The message also suggests that you shorten the file name and try to copy again.

 

 
 
Cause
This problem occurs because of an issue in how Windows handles the long-path errors.
 
 

Resolution

To resolve this issue for Windows 7 and Windows Server 2008 R2, install the hotfix that is described in this article.

 

https://support.microsoft.com/en-us/help/2891362/a-file-copy-operation-fails-when-files-or-folders-have-long-paths-in-w

 


Edited by Joe C, 02 April 2018 - 03:14 PM.


#9 joseibarra

joseibarra

  • Members
  • 1,240 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Downstairs

Posted 02 April 2018 - 04:05 PM

Right click each drive, Properties - are the File Systems the same (such as NTFS).

 

What is the manufacturer and model number of the new drive and when you checked with their technical support what did they suggest?


The mediocre teacher tells. The good teacher explains. The superior teacher demonstrates.


#10 chefelf

chefelf
  • Topic Starter

  • Members
  • 12 posts
  • OFFLINE
  •  
  • Local time:02:21 PM

Posted 04 April 2018 - 09:02 AM

Okay, I applied that hotfix and I THINK it worked.  It asked me to select a drive to unzip to and defaulted to C:\.  I clicked okay then it unzipped and that was it.  In examining C:\ I couldn't find anything additional to apply.  Maybe I'm missing something but there was no documentation with the hotfix on how it worked.  I also installed all Windows updates.

 

I went to copy all the files again and got the same message again.  Unfortunately since it doesn't tell you any additional information I have no idea where those files even are that are causing the issue.  There are hundreds of thousands of files on the drive.

 

Attached is a copy of the dialogue that pops up.

 

Thanks again for everyone's help!

Attached Files



#11 JohnC_21

JohnC_21

  • Members
  • 24,311 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:01:21 PM

Posted 04 April 2018 - 11:26 AM

I would think you would need to double click a file in the unzipped folder in order to install the hotfix. It should be a file with a MSU extension.

 

I believe this can happen if you have folders that are too deeply nested into other folders. If that is the case then move a folder to the root of the drive and see if it copies.


Edited by JohnC_21, 04 April 2018 - 11:30 AM.


#12 chefelf

chefelf
  • Topic Starter

  • Members
  • 12 posts
  • OFFLINE
  •  
  • Local time:02:21 PM

Posted 04 April 2018 - 09:30 PM

Okay I found out where it unzipped the hotfix.  When I went to install it popped up a dialogue box that said "The update is not applicable to your computer."

 

Additionally I cannot move the files as I'm not sure where the long filenames are located as Windows will not give me that information.

 

I'm very confused as to how the long filenames can exist in the first place then be unable to be copied to a path with an identically sized filename on another drive.

 

To answer a previous question the two HDD models are:

 

Current Drive: Seagate ST31500341AS 1TB

New Drive: Seagate ST2000DX002-2DV164 2TB

 

 

Thanks again to everyone for trying to help with this situation.  I'm stumped.



#13 JohnC_21

JohnC_21

  • Members
  • 24,311 posts
  • OFFLINE
  •  
  • Gender:Male
  • Local time:01:21 PM

Posted 04 April 2018 - 10:00 PM

When you downloaded the update did you get correct one? X86 would be for a 32bit OS. X64 for 64bit. 

 

Have you tried moving one of the folders to the root of the drive then doing a copy? 

 

I think this could be done using a live linux distro like Mint Cinnamon. I don't believe linux has this bug. You would boot Mint which would run from RAM and the DVD or USB flash drive then copy the files from one drive to the other. 



#14 joseibarra

joseibarra

  • Members
  • 1,240 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Downstairs
  • Local time:02:21 PM

Posted 05 April 2018 - 12:49 AM

Before suggesting a hotfix I think I would at least take a look at the hotfix myself and the list of files it wants to install and check the dates/versions as many hotfixes are old and have been rolled into later Windows Updates.  

 

If the dates on the files are earlier than what I have now I would be hesitant to install the hotfix but if I were really curious I would make a System Restore point so I could undo the change and then see if the hotfix will install on my own system first - chances are most hotfixes will not install on an up to date system.

 

Many hotfixes are so old they even contain pre Service Pack 1 files and forunately attempting to install them will fail on must systems.

 

if you were to install the hotfix (which seems to have a shell.dll version 6.1.7601.22503) you would be taking that file back in time about 5 years on your system - probably not a good idea - that is why the update is not applicable to your system.  You should be glad it failed to install.

 

Assuming both drives are formatted NTFS (I did not ask that before) and with some Google searches it seems that robocopy (Robust File Copy) which comes with Windows 7 might be the answer.

 

I haven't used robocopy in a long time but maybe somebody here is familiar with it and can offer some ideas.

 

I think that if you simply want to copy everything from drive F to drive D open a Command Prompt window (as Administrator) and enter the command:

 

robocopy   f:\*.*   d:\*.*

 

Some Googling with reveal many results about how to use robocopy.


Edited by joseibarra, 05 April 2018 - 12:57 AM.

The mediocre teacher tells. The good teacher explains. The superior teacher demonstrates.


#15 chefelf

chefelf
  • Topic Starter

  • Members
  • 12 posts
  • OFFLINE
  •  
  • Local time:02:21 PM

Posted 06 April 2018 - 01:33 PM

Just as an update: I ended up just using SyncBack Free (what I use for nightly backups) as an attempt to get these files copied over and it worked with no problem.  Everything seems to be updated now.  Very odd that Windows can't seem to do this natively.

 

Thanks again to everyone for your help!






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users