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

    • I see the Winblows 11 BETA testing continues. This is just Windows 10 all over again. Oh well, everything is still smooth sailing over here on Windows 10 21H2 LTSC. You unpaid sheep BETA testers be sure to let us know when you get done BETA testing Winblows 11 for the rest of us. 🤣
    • What do you expect? Windows 11 is still in BETA. This is Windows 10 all over again. M$ doesn't hire people to do BETA testing anymore. They just let all the dumb sheep with FOMO do all the BETA testing for them. It's the same dumb sheep who use self-checkout at the store and do someone else's job for FREE! All while the worker who's getting paid just stands there and watches them. 🤣 🤡
    • Pet peeve: Microsoft using scaling options to get around the fact they removed font size settings, as if that's somehow acceptable to do. Thankfully third party apps still can adjust font sizes just fine, even though it often randomly resets on OS updates. And the funny thing is that not only are the scaling options horrible crutches, but they only work in some applications. And, ironically enough, even some apps from Microsoft themselves have hardcoded tiny fonts in certain dialogs in them. Example - certain parts of MS Office apps UI.
    • Unofficial script does the most useful official Windows 11/10 repairs you want automatically by Sayan Sen IT admins and system admins, and even home users have to run various Windows diagnostic runs from time to time in order to iron out or work around system problems. Last year, Microsoft published a guidance piece about various such native Windows apps, tools and utilities they include the like of Task Manager, Registry Editor, and more. Aside from them, Windows also comes with SFC (System File Checker) and DISM (Deployment Image Servicing and Management) to scan and fix corrupt and missing system files. Besides those, various other ways to help and diagnose network issues related to DNS (Domain Name System), among others, also exists. In order to save time running these, a Reddit user has created a new tool that automates all of these into a single package. The author writes that the Batch script (.BAT file) they have developed is "basically a one-stop script that can help clean up your system, run built-in diagnostics, fix common network issues, and generate system reports." The script is based on native Windows tools like netsh, ipconfig, systeminfo, among others, and the idea behind this is essentially to save time. The tool can be of help with Windows Update repairs, among others, something we all know is pretty common, and even Microsoft's own support articles may not prove to be helpful. Here is everything the utility can do for you: Run SFC, DISM, CHKDSK from a single menu Restart network adapters with auto-detection Flush or set DNS (Google, Cloudflare, or custom) Windows Update repair (resets services + cache) Generate system reports (saved as .txt files on Desktop) Show installed drivers Clean up temp files Registry backup and restore (manual) The latest version of the utility is now available for download on GitHub. The new version fixes issues related to admin privileges. As the script requires it to be run as an admin, it now restart itself to work in admin mode even if a user forgot to run it as an administrator. To download it, head over to its GitHub page here. The utility is named Windows Maintenance Tool. As always, though, make sure to back up your PC as this is an unofficial third-party app, and it's better if you test it first in a VM. Source: Lil_Batti (Reddit)
    • Come the hell on, do we need clickbait titles? "Overwatch 2" - 11 characters "a popular multiplayer hero shooter" - 34 characters What's the purpose here - delivering news or titles for clicks? I think we all know the answer. You're straying into "Number 7 on this list will SHOCK you" territory and while it may work on some crappy sites, this is why they are crappy sites. Just tell the story! Go back and look at popular articles that made Neowin what it was. Did they have headlines of "New OS from major technology conglomerate has astonishing new feature" or is it likely to tell the story succinctly and then elaborate within the content?
  • Recent Achievements

    • One Month Later
      CoolRaoul earned a badge
      One Month Later
    • First Post
      Kurotama earned a badge
      First Post
    • Collaborator
      Carltonbar earned a badge
      Collaborator
    • Explorer
      MusicLover2112 went up a rank
      Explorer
    • Dedicated
      MadMung0 earned a badge
      Dedicated
  • Popular Contributors

    1. 1
      +primortal
      508
    2. 2
      ATLien_0
      270
    3. 3
      +FloatingFatMan
      246
    4. 4
      +Edouard
      201
    5. 5
      snowy owl
      168
  • Tell a friend

    Love Neowin? Tell a friend!