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

    • In my mind, I might not want to see what they post and the easiest way to do that was to add them to my ignore list.
    • Secure wipe your Windows 11 device with this Data Shredder Stick, now 25% off by Steven Parker Today's highlighted deal comes via our Neowin Deals store, where you can save up to 25% off the Data Shredder Stick. A secure data wiping tool for Windows. The Data Shredder Stick is your ultimate solution for securely erasing sensitive data, ensuring that your information is truly gone and unrecoverable. With its simple drag-and-drop functionality, the Data Shredder Stick allows you to securely wipe individual files or folders with ease. By shredding data, the space it occupied is overwritten, making it impossible to retrieve. This is an essential tool for anyone preparing to sell or dispose of a computer, laptop, or storage drive, giving you peace of mind that your personal or business data won't fall into the wrong hands. Designed for unlimited use, the Data Shredder Stick can be deployed on as many computers and drives as needed. Simply plug the USB drive into your Windows computer, run the app, and start shredding. Whether you're wiping files, folders, or entire drives, this tool makes data security easy, fast, and effective. Protect your privacy with the Data Shredder Stick – the simple, reliable way to ensure your data stays erased for good. Secure data deletion made simple Securely Wipe Hard Drives: When files are deleted from hard drives, they are placed in unallocated space and can be recovered until overwritten. The Data Shredder Stick can wipe all of this deleted space by overwriting every bit of unallocated space on an entire drive ensuring your data is truly gone. Securely Wipe Files or Folders: Simple drag-and-drop operation allows you to wipe files on the fly. When you shred files or folders, the space they occupy is overwritten so no part of the file can be recovered. Shred Your Data Before Selling Equipment: Rest easy whenever you want to sell a computer, laptop, or any type of storage drive Unlimited Uses: Use the Data Shredder Stick on as many computers and drives as you want Data Shredder Stick is simple to use Plug the Data Shredder Stick into your computer and run the app. To shred files or folders, drag-and-drop them into the shredder. To shred all the deleted space from an entire drive, select the drive and shred away Specs: Brand: Paraben Consumer Software Color: red Dimensions: 2" x 0.8" x 0.1" Interface: USB 3.0 Easy plug-and-play Unlimited uses Manufacturer's 1-year warranty Good to know Length of access: lifetime Redemption deadline: redeem your code within 30 days of purchase Access options: desktop & mobile Updates included Learn more about our Lifetime deals here! The Data Shredder Stick normally costs $39.99 (Amazon), but you can pick this up for just $29.99 for a limited time - that represents a saving of $10 (25% off). For a full description, specifications, and terms, click the link below. Get the Data Shredder Stick for just $29.99 (was $39.99) Ships only to Contiguous US We post these because we earn commission on each sale so as not to rely solely on advertising, which many of our readers block. It all helps toward paying staff reporters, servers and hosting costs. Other ways to support Neowin Whitelist Neowin by not blocking our ads Create a free member account to see fewer ads Make a donation to support our day to day running costs Subscribe to Neowin - for $14 a year, or $28 a year for an ad-free experience Disclosure: Neowin benefits from revenue of each sale made through our branded deals site powered by StackCommerce.
    • I have two Tab S9 FEs and two Tab A9+ tablets. While the Tab A9+ is not as powerful as the Tab S9 FE, I like the much cheaper Tab A9+ better. It has a slightly more Landscapish display for those who use the Landscape mode. I haven't noticed much difference in the speakers. The S9 FE does better on battery drainage at around 7% an hour vs 9% an hour for the Tab A9+. I don't use Fast Charging because it is not good for the battery and I haven't really compared the charge time between the two. One thing for sure is the Tab A9+ does a lot better at handling memory under Android 15 UI 7 than it did under Android 14, UI 6.1. The Tab A10+ has yet to be released and as I understand it, it has major chipset and charging upgrades. It is expected to be released late this summer or early fall, but with all Samsung hardware releases, I imagine this one will be same where the U.S. is not among the early markets to see a new device.
    • As such, about 30,000 government sector computers would be switching by 2027 or so. I have been there and done it though probably not with as many as 30,000 computers. i worked on a Bank of America conversion project and it was a mess, a complete mess. Computer system conversions are never as easy as they sound in the media or even the Corporate Boardroom or Government high-up offfices. One may ask, what MIcrosoft hardware and sofware the government of Denmark is using in addition to desktop computers and Office?. One thing for sure. We know that they aren't using Windows 10 Mobile.
  • Recent Achievements

    • Explorer
      Case_f went up a rank
      Explorer
    • Conversation Starter
      Jamie Smith earned a badge
      Conversation Starter
    • First Post
      NeoToad777 earned a badge
      First Post
    • Week One Done
      JoeV earned a badge
      Week One Done
    • One Month Later
      VAT Services in UAE earned a badge
      One Month Later
  • Popular Contributors

    1. 1
      +primortal
      549
    2. 2
      ATLien_0
      239
    3. 3
      +Edouard
      160
    4. 4
      +FloatingFatMan
      147
    5. 5
      Michael Scrip
      112
  • Tell a friend

    Love Neowin? Tell a friend!