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

    • It's become a central place at my workplace. I use it for meetings, general chatting between employees, and the teams for storing of files to share between people at work. 
    • It's a Dell color laser printer. Back when Microsoft kept having these security flaws with the print spooler and recommending you disable it I just got in the habit of it, and I use it so rarely now I just leave it disabled in case another flaw pops up.
    • KDE makes progress toward full Wayland session restore in Plasma 6.5 by David Uzondu In the latest issue of This Week in Plasma, the development team, as usual, brings news of ongoing work for the desktop environment. While KDE continues to polish the recently released Plasma 6.4, work has already taken off on the next major version of Plasma, 6.5. A significant step forward is being made on Wayland session restoration; the xx-session-management-v1 restore protocol has been implemented in Qt 6.10, which means KDE applications and Plasma itself can soon start using it to finally bring proper session restore to Wayland. For more immediate user-facing changes in Plasma 6.5, the Welcome Center application now teaches you about the many available keyboard shortcuts, as well as "what the heck the 'Meta' key is." For those who frequently work remotely, Plasma's built-in RDP server now supports syncing clipboard text between the client and server. The clipboard also received another useful feature, letting you copy the QR code for an item, not just view it. The team is also addressing smaller usability issues across the desktop, including fixes that will land in point releases for Plasma 6.4. Spectacle, for example, will no longer show a ghostly semi-transparent version of its menus in screenshots. The New! badge, which was introduced in Plasma 6.4 is now easier to read with better colors. Other notable UI improvements include: A new button on the "missed notifications" pop-up that lets you view what you actually missed. The Networks widget is now much better at telling you what it is doing, like when it is "looking for wireless networks". Inertial scrolling with touchpads is now active in all QtQuick-based KDE software. As always, the KDE team spent the week squashing bugs across various versions of Plasma and related software. Plasma 6.4.1, which went live this Tuesday, addressed several crashes in the desktop portal implementations and patched the open/save dialog, where apps could insert extra UI elements in the wrong places. It also resolved a recent performance regression affecting some games and fixed a strange issue with drawing tablets where the pointer could disappear when two were connected in different modes. 6.4.1 tackled a particularly odd hardware-specific problem with Samsung Odyssey G5 monitors endlessly turning on and off because of a faulty DDC implementation. KDE responded by blacklisting the device. In addition to that, the update fixed an accessibility regression in Discover, corrected an issue where deleting a favorited app left behind a ghost item you couldn't un-favorite, and restored the Window List widget's ability to minimize windows. As for fixes planned for 6.4.2, here's the full list as outlined by the Plasma team: Fixed a case where System Settings' Flatpak App Permissions page could cause the whole app to crash. Fixed an issue that could sometimes cause Plasma to go back to sleep again right after waking up, when the "Sleep then hibernate" setting is in use. The appearance of text labels in Folder View pop-ups is once again correct. You're no longer erroneously prompted to authenticate for a Wireguard VPN whose credentials are already stored in KWallet, and the wallet is set up to automatically open at login. Fixed an issue in the KDE desktop portal's screenshot implementation that prevented the delay setting from taking effect. Missing app backends listed in Discover's Settings page once again show the correct names. The brightness level shown on System Settings' Display & Monitor page now matches the one shown in Plasma. Fixed an issue that caused the panel to have too much space in it until restarting Plasma if you stop displaying the date on a horizontally-laid-out Digital Clock widget. The older Plasma 6.3.6 fixed video stuttering on variable-refresh-rate screens and patched the Weather Report widget after Environment Canada changed its data format. You can check out the full update on the official KDE Blog.
    • I'm happy with my setup. I have a raid 1 two drive Synology setup that I backup with Time Machine to every so often. What is your setup at home? 
    • Enterprise support (ex. Premier Support) is a bit different cup of coffee. I am not saying it is great, but they have SLAs and I have received solution within hours and even patches within 3 days.
  • Recent Achievements

    • One Year In
      TsunadeMama earned a badge
      One Year In
    • Week One Done
      shaheen earned a badge
      Week One Done
    • Dedicated
      Cole Multipass earned a badge
      Dedicated
    • Week One Done
      Alexander 001 earned a badge
      Week One Done
    • Week One Done
      icecreamconesleeves earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      569
    2. 2
      ATLien_0
      187
    3. 3
      +FloatingFatMan
      184
    4. 4
      Skyfrog
      112
    5. 5
      Som
      108
  • Tell a friend

    Love Neowin? Tell a friend!