Copy all files and folders from one HDD to another HDD using Robocopy?


Recommended Posts

In my curious ways :p Im wondering how to make a exact copy of all files and folders from one drive to another.

Ive found (S:/ is Source and D:/ is Destination)

robocopy S:/ D:/ /MIR

But there are sys files it doesn't copy over.

How can I make a "dd" out of robocopy?

  On 16/04/2014 at 18:32, riahc3 said:

In my curious ways :p Im wondering how to make a exact copy of all files and folders from one drive to another.

Ive found (S:/ is Source and D:/ is Destination)

robocopy S:/ D:/ /MIR

But there are sys files it doesn't copy over.

How can I make a "dd" out of robocopy?

 

 

Have you tried XCOPY that ships with all versions of Windows?

  On 16/04/2014 at 18:45, riahc3 said:

Whats the difference between it and robocopy?

XCOPY is a core EXE of the OS and it can copy anything that you're allowed to read. All you need to do is run the command prompt as administrator.

 

Using XCOPY and then manually reconstruct a boot environment is better than to rely on some random 3rd part app.

XCOPY is good for anything that you want to copy.

system files won't copy over even with the copy command.  Mir = /e + /purge

/E :: copy subdirectories, including Empty ones.

/PURGE :: delete dest files/dirs that no longer exist in source.
/MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).

 

robocopy /?

will give you all of the commands.

 

I would do this

robocopy s: d: /E /MT:20 /V /ETA /LOG:c:\users\userid\desktop\robocopy.txt

 

This way it will do a multithreaded copy (copying 20 files at a time vs 1 at a time), and give you a log of what it misses or errors on, if you want to purge the files that are no longer on the source then by all means do the MIR.  After you have found the files with the system attribute in the log you can create a batch file rather quickly to remove the system attribute on those files and run the copy again.  Note that if a file is in use you cannot copy it in this method, usually system files are in use like the explorer.exe.  Keep in mind that hidden files/folders also will not be copied.

xcopy /v /e /h /r (Source) (Target)

 

xcopy /v /e /h /r c:\*.* d:\*.*  - for example would copy the entire c drive to a d drive.

 

/v - verification

/e - folder's including empty one's

/h - hidden / system files

/r - read only files

 

More Information on switches

http://technet.microsoft.com/en-us/library/cc771254.aspx

What system files are you trying to copy? Are you trying to copy a OS drive/dir or data dir? What exactly are you trying to accomplish, robocopy is great for doing a mirror of data structure - but not sure I would use it as a means of trying to copy over or backup a OS directory structure like windows or program files, etc.

  On 16/04/2014 at 19:39, sc302 said:

system files won't copy over even with the copy command.  Mir = /e + /purge

/E :: copy subdirectories, including Empty ones.

/PURGE :: delete dest files/dirs that no longer exist in source.

/MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).

 

robocopy /?

will give you all of the commands.

 

I would do this

robocopy s: d: /E /MT:20 /V /ETA /LOG:c:\users\userid\desktop\robocopy.txt

 

This way it will do a multithreaded copy (copying 20 files at a time vs 1 at a time), and give you a log of what it misses or errors on, if you want to purge the files that are no longer on the source then by all means do the MIR.  After you have found the files with the system attribute in the log you can create a batch file rather quickly to remove the system attribute on those files and run the copy again.  Note that if a file is in use you cannot copy it in this method, usually system files are in use like the explorer.exe.  Keep in mind that hidden files/folders also will not be copied.

Sadly I went ahead and did it with mir but missed the multithreaded switch.
  On 16/04/2014 at 19:39, sc302 said:

system files won't copy over even with the copy command.  Mir = /e + /purge

/E :: copy subdirectories, including Empty ones.

/PURGE :: delete dest files/dirs that no longer exist in source.

/MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).

 

robocopy /?

will give you all of the commands.

 

I would do this

robocopy s: d: /E /MT:20 /V /ETA /LOG:c:\users\userid\desktop\robocopy.txt

 

This way it will do a multithreaded copy (copying 20 files at a time vs 1 at a time), and give you a log of what it misses or errors on, if you want to purge the files that are no longer on the source then by all means do the MIR.  After you have found the files with the system attribute in the log you can create a batch file rather quickly to remove the system attribute on those files and run the copy again.  Note that if a file is in use you cannot copy it in this method, usually system files are in use like the explorer.exe.  Keep in mind that hidden files/folders also will not be copied.

BTW, this gives no visual output; Just says:

"Log File : C:\robocopy.txt"

% and times would be nice IMO.

What do you think /ETA is? But your putting it in the log, if you want log and console use

 

/TEE :: output to console window, as well as the log file.

 

I personally would not put /ETA in the log - its makes it hard to read..  lots of this

 

 0%  
  3%  
 25%  
 28%  
 35%  
 42%  
 50%  
 53%  
 57%  
 64%  
 71%  
 75%  
 89%  
 92%  
100%  
100%

 

But if you want log and console /TEE is what you want - just add it at the end of the command

  On 21/04/2014 at 13:04, sc302 said:

Open the log file as it is copying. You will have to close and open to refresh.

Or just use tail, here is windows version

http://tailforwin32.sourceforge.net/

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • Minecraft Chase the Skies update and Vibrant Visuals graphics overhaul lands next week by Pulasthi Ariyasinghe The second major game update of the year for Minecraft is almost here. Mojang today announced that its next Game Drop, Chase the Skies, is landing on June 17. Alongside it, the highly anticipated graphics overhaul, dubbed Vibrant Visuals, will be available too, making the day a rather big occasion for Minecraft fans. The Chase the Skies update has a large number of gameplay features and content, but one of the biggest is the expansion of the Ghast. Now, players will be able to find Happy Ghasts as a tameable mob, letting up to five players ride them on journeys across the skies. To get one, players will have to find small, dehydrated Ghasts near fossil structures in the Nether, then bring it to the overworld and feed it plenty of water. It is also possible to craft dried Ghasts from Nether materials. Other features of this update include a handy player locator bar, better leads functionality, craftable saddles, a new music disc, and more. As for the Vibrant Visuals upgrade, Mojang is touting a visual refresh that lets players witness how lights and shadows affect the Minecraft world. "Fly high with your happy ghast to watch the sunrise reflect on the rippling ocean, make art with shifting shadows, descend into dark depths, or simply sit back and enjoy the vivid beauty of each biome," says the studio. "With updated in-game visuals you’ll see how light and shadow transform the Overworld – water reflects, forests become shaded, fog drifts, and waterfalls glimmer in the light." The currently supported devices for Vibrant Visuals include Xbox Series X|S, Xbox One, PlayStation 4, PlayStation 5, PC, as well as Android (Android: Adreno 640, Mali-G68, Mali-G77, or Xclipse 530 or higher) and iOS (A12 or M1 or higher.)   Unfortunately, the Vibrant Visuals upgrade will only be available on the Bedrock Edition of Minecraft, at least for now. Mojang has said that it plans to bring the visual overhaul to the Java Edition of Minecraft at a later date, but no information or release window has been announced just yet.
    • Once people get use to the square-ish case, they'll probably switch the display to square as well.
    • Why would you think it's not enabled all the time? Because they said so?
    • $100 billion of the $200 billion is in N.Y. State over the upcoming 20 years plus. Obviously 20+ year spending plans are subject to change.
    • I own one somewhere and even got the email from Amazon letting me know about the recall but not sure I'll be able to find it. Haven't seen it in months.
  • Recent Achievements

    • One Month Later
      POR2GAL4EVER earned a badge
      One Month Later
    • One Year In
      Orpheus13 earned a badge
      One Year In
    • One Month Later
      Orpheus13 earned a badge
      One Month Later
    • Week One Done
      Orpheus13 earned a badge
      Week One Done
    • Week One Done
      serfegyed earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      549
    2. 2
      ATLien_0
      250
    3. 3
      +Edouard
      163
    4. 4
      +FloatingFatMan
      157
    5. 5
      Michael Scrip
      110
  • Tell a friend

    Love Neowin? Tell a friend!