windows - What's the easiest way to duplicate a portion of a directory structure onto an external drive?

06
2014-04
  • Jon Cage

    I'm trying to move a large chunk of data from one of our servers onto an external drive for delivery to Amazon glacier storage.

    To do that, I'd like to copy a chunk of the server, preserving the directory structure. I.e. move this:

    \\MyServer\Some\Longwinded\Path\TheDataIWantToCopy
    \\MyServer\Some\Longwinded\Path\TheDataIWantToCopy\First bit of data\DataFile1.dat
    

    to this:

    D:\
    D:\First bit of data\DataFile1.dat
    
  • Answers
  • mvp

    You could use Windows Explorer to copy directories.

    If you prefer command line, then xcopy should work:

    xcopy \\MyServer\Some\Longwinded\Path\TheDataIWantToCopy D: /S
    

    I am Linux guy myself and prefer Linux tools like rsync, and there is rsync UI compiled for Windows called grsync which may work even better because it is restartable (it would not copy files that already have been copied).

  • Brian

    For moving large amounts of files or even small amounts that take a long time on Windows the robocopy command works well. Has options that let you resume a copy that got interrupted somehow or copy a few files that got added since the last copy without redoing all the files.

    To mirror the directories and files from the source to destination use the below. Mirror will delete and add files as needed so can be re-run when only some files were missed, some changed or some were removed etc without copying everything again like xcopy would.

    robocopy \\MyServer\Some\Longwinded\Path\TheDataIWantToCopy D:\ /MIR
    

  • Related Question

    windows - Directory appears when I connect an external drive
  • ianix

    I had a folder named Downloads in the user folder (C:\Users\User). I don't know exactly what I did, but basically I tried to move or copy the folder to an external drive. But the folder was there in the same directory. After I disconnected the external drive the folder dissapeared. After panic, swearing and tears (hadn't yet related with the external drive thing), I created another folder with the same name (Downloads). Then when I connect the external drive again I see two folders with the same name! All my files were in one of them (joy!), but I don't understand what is happening.

    Any ideas?

    I'm using Vista x64, with NTFS.


  • Related Answers
  • John T

    Check the folders properties, if the contents dissapear when the drive is removed, you may have made some sort of shortcut or hard/symbolic link.

  • Axxmasterr

    Chances are when you disconnected the external drive it also disconnected the folder the directory you speak of is contained within.

    This is just my guess as to what is happening.