The file name is too long for destination folder - copy and paste backup of drive

Status
Not open for further replies.

jasonhickman17

Distinguished
May 15, 2013
197
0
18,690
Hello everyone,

My current backup system requires me to copy and paste files from my 4TB seagate to the other 4TB seagate (both internal drives) manually when I want to make the master copy, being that this is the first time doing this I knew that there were going to be some issues, but I do not know how to get past this. There are many many folders which include a lot of files and data totaling about 800GB of data. I would like to keep the files as they are organized and really I am just trying to mirror the drive which took me hours to fill up with all of the documents and pictures that I needed to back up in the first place.

So to bring me to my question, what is the best way to copy all of the files and file folders in the order that they are currently in to a completely blank hard drive and get around the "file name/path too long for the destination" error that I keep getting?

Thanks in advance!

J.H.


EDIT: This all being said should I just clone the hard drive since I need the exact files? If so what program should I use to clone it?
 
Solution
The /copyall switch is related to copying security / timestamps etc..

To simply copy the all of the files on the drive, I would use:
robocopy s:\source\ t:\target\ /e /np /nfl /copyall /tee /log:backup.log

s:\source source drive (and folder if desired)
t:\target target drive (and folder if desired)
/e copy subdirs, even empty ones
/np no progress percentage displayed / logged
/nfl no file list (I like to see a dir list scrolling just to see progress)
/copyall copy data, attributes, timestamps, security, owner
/tee send output to screen and a log file
/log:backup.log log everything to a file.

you can check summary in the log file for any failures and locate errors in the log file if needed.

a big advantage of robocopy is...

miller3476

Distinguished
Jul 16, 2012
35
0
18,540


 

jasonhickman17

Distinguished
May 15, 2013
197
0
18,690



That is perfect thank you very much!

If you know how to use robocopy, please correct me if I am wrong but to be able to copy all of the files from the first 4TB Seagate drive to the other 4TB Seagate drive I would just use copy all?

robocopy D:/May16th,2017backup e:\May16th,2017backup /copyall


EDIT: Also, would the xcopy function work for me in this situation?

I am trying to avoid using the /mir function in robocopy since I do not want to lose any files in the source destination since it took so long to be able to get all of those files there in the first place, about three hours to be exact :p

xcopy function that I would be looking to use would be this

xcopy /w /v /e /h /r /f c:\*.* d:\*.*

Just another update here, I am going to try using the above xcopy and see if it works, if not I will let you know. Thank you for the help!
 

jasonhickman17

Distinguished
May 15, 2013
197
0
18,690
Just in case someone else finds this thread hoping to do the same thing, I found that the best way to copy and past information where the file names are too long for the destination file system is to open CMD with administrative rights, then to use the following command

xcopy /w /v /e /h /r /f (sourcedriveletter):\*.* (destinationdriveletter):\*.*

Replacing (sourcedriveletter) with your source drive and (destinationdriveletter) with your destination drive which for example if my source drive was G and my destination drive was H the command would look like the following

xcopy /w /v /e /h /r /f H:\*.* G:\*.*

I then made sure that after all of the files had transferred, the computer did not miss any files which in my case it did, there were a few read only files that it did not transfer even with the above command specifically stating that it had to transfer all read only files, it may have been a combination of the fact that they were read only files as well as the fact that the folder names were large and the file names were large making it a bit of a combination of things. I hope this all helps anyone who ends up having the same issue!
 

miller3476

Distinguished
Jul 16, 2012
35
0
18,540
The /copyall switch is related to copying security / timestamps etc..

To simply copy the all of the files on the drive, I would use:
robocopy s:\source\ t:\target\ /e /np /nfl /copyall /tee /log:backup.log

s:\source source drive (and folder if desired)
t:\target target drive (and folder if desired)
/e copy subdirs, even empty ones
/np no progress percentage displayed / logged
/nfl no file list (I like to see a dir list scrolling just to see progress)
/copyall copy data, attributes, timestamps, security, owner
/tee send output to screen and a log file
/log:backup.log log everything to a file.

you can check summary in the log file for any failures and locate errors in the log file if needed.

a big advantage of robocopy is that if it stops for any reason, you can just restart. it will scan through the files already copied very quickly and resume copying data where it left off. Once you have a copy, you can always just re-run the robocopy to "update" the target. It will only copy new or modified files so it will must faster than the initial copy. If you add the /mir swtich, robocopy will delete files and folders on the target that no longer exist on the source. Please be careful with this switch.

 
Solution
Frankly it seems to me your "EDIT" comment in your original query makes the most sense in your situation since you will be dealing with about 800 GB of data, a considerable volume of data.

I see no reason why you would not utilize a disk-cloning program to clone the contents of that 4 TB HDD to another 4 TB HDD. By & large it's is a relatively simple, straightforward, and effective way to achieve your objective of backing up the complete contents of your "source" drive.

There are any number of freely-available disk-cloning ("data migration) programs available on the net. A few of the popular ones are Macrium Reflect, Easeus Todo Backup, AOMEI BackUpper, as well as a slew of others. You might want to do some Google research.

The d-c program we utilize is the Casper program. It's a commercial program costing $49.99 so most PC users are loathe to purchase a type of program that can obtain freely on the net. We use the program primarily for its speed & effectiveness since we're primarily using the program for comprehensive backups of our systems which we undertake on a frequent/routine basis (sometimes daily, for instance).

Anyway I mention the Casper program because a 30-day Trial Version is available and perhaps you'd like to avail yourself of it. Download from https://www.fssdev.com/products/casper/trial/

Here are some instructions for using the program...

1. After installing the program and before undertaking the disk-cloning operation close all open programs. (Generally you need not disable your anti-virus program). Ensure your destination drive - the proposed recipient of the clone, your other 4 TB HDD - is properly connected in the system. You haven't indicated whether your working with a desktop or laptop PC. If a desktop, you can, of course, connect the 4 TB destination drive internally in the system. If a laptop, presumably it will be connected via USB.

2. The opening screen of the program will highlight "Create a Bootable Backup". Click on "Add drive" and a listing of the appropriate destination drive(s) will appear, e.g., your 4 TB HDD, the recipient of the proposed clone.

3. Click on the destination drive's listing and then the "Back up now" button.

4. Casper will run in the background and alert you when the disk-cloning operation is completed. (You can view the actual progress chart by clicking on the Casper icon in the Notification Area on the Taskbar.)

5. Of course you'll check your system following the d-c operation to determine the recipient of the clone is a successful copy of the source drive.

So as you can see from the above outline it's a pretty cut & dried process with relatively little user input necessary to carry out the disk-cloning operation.
 
Status
Not open for further replies.