Moving files from hard drive to another - How to prevent duplicates?


  1. Posts : 241
    Windows 10 Pro
       #1

    Moving files from hard drive to another - How to prevent duplicates?


    I need to move files (mostly pictures and videos) from an hard drive pulled from an older Windows 7 machine to a backup external drive (using Windows 10)

    There are some files on the pulled HDD that are also on the backup drive, but they are all mixed, so I can't just copy them into the new drive and get the prompt where Windows asks me what to do - thus I have to search my self for duplicates

    But is there a less painstaking work I can do? Using some advanced commands? (The pulled drive is a complete Windows 7 installation drive, so not just the photos and videos, but everything, including Windows, C:/, Program Files etc..)

    Ty!
      My Computer


  2. Posts : 11,247
    Windows / Linux : Arch Linux
       #2

    Hi there

    Try Grsync for Windows -- it's a GUI port of the Linux rsync program.

    More Reasons Why Grsync Is An Awesome Syncing Tool [Cross-Platform]

    Among things it does nicely is copy files from Dir A to Dir B IF they DON'T exist in B.

    Read documentation though --usually for what you want is check skip existing but loads of other options.

    Moving files from hard drive to another - How to prevent duplicates?-snapshot8.png

    Cheers
    jimbo
      My Computer


  3. Posts : 241
    Windows 10 Pro
    Thread Starter
       #3

    Looks great, I'll give it a try and tell you how it did!

    **Addition: If I have 2 copies of the same file, but with different names (example picture1.jpeg and picture2.jpeg, but they are indentical), is there a way for Windows/Other software to still recognize the duplicate?
      My Computer


  4. Posts : 5,478
    2004
       #4

    mibaup said:
    If I have 2 copies of the same file, but with different names (example picture1.jpeg and picture2.jpeg, but they are indentical), is there a way for Windows/Other software to still recognize the duplicate?
    There are plenty of programs that will do this. You could see here The Best Duplicate File Finder for Windows

    Another way to copy all of your pictures/videos from one drive to another is to use the copy command. For example this powershell command will copy all .mp4 and .mkv found anywhere on D drive to a directory called "E:\Videos" if they don't already exist
    Code:
    Get-ChildItem "D:\" -recurse -include @("*.mp4","*.mkv")  | `  
    Foreach-Object { if (-not (Test-Path ("E:\Videos\"+$_.name))) { ` 
    Copy-Item $_.fullname -destination "E:\Videos\"}}
    You may or may not find it easier than using a program depending whether you want to keep old folder hierarchy I guess but might be handy if you don't know where the originals are and wanted to consolidate them.
      My Computer


  5. Posts : 241
    Windows 10 Pro
    Thread Starter
       #5

    Thank you lx07, I don't care about older hierarchy, so this command may be useful, right now I can't test any of your methods, but still, in the command, I need to create a new drive E:/? or the command will create E:/ and the folder Videos?

    (I dont care if the new folder will be in an existing drive, as long as it's on the external hard drive)
      My Computer


  6. Posts : 5,478
    2004
       #6

    mibaup said:
    Thank you lx07, I don't care about older hierarchy, so this command may be useful, right now I can't test any of your methods, but still, in the command, I need to create a new drive E:/? or the command will create E:/ and the folder Videos?

    (I dont care if the new folder will be in an existing drive, as long as it's on the external hard drive)
    When you plug in your 2 drives (the old 7 one and the backup one) Windows will give them drive letters. Most likely they will be D and E but they could be E and F if you have a CD drive. Really they could be any letter.

    You'd have to change the command above to copy from the drive with 7 on (D in my example) to your backup (E in my example) and change /Videos to a directory that exists that you want to copy them to).

    You can then run it again and change the bit that selects ".mp4" and ".mkv" to ".jpg" and whatever other format your pictures are to get all your pictures and copy them to a directory called E:\Pictures for example.
      My Computer


  7. Posts : 2,832
    Windows 10 Pro X64
       #7

    Hi,

    I need to create a new drive E:/? or the command will create E:/ and the folder Videos?
    You need to replace the code (path) marked in red with whatever corresponds to your actual drive letters and destination folder.
    Oh, and it should E:\ "back slash" btw.

    Cheers,
      My Computers


  8. Posts : 7,128
    Windows 10 Pro Insider
       #8

    lx07 said:
    There are plenty of programs that will do this. You could see here The Best Duplicate File Finder for Windows

    Another way to copy all of your pictures/videos from one drive to another is to use the copy command. For example this powershell command will copy all .mp4 and .mkv found anywhere on D drive to a directory called "E:\Videos" if they don't already exist
    Code:
    Get-ChildItem "D:\" -recurse -include @("*.mp4","*.mkv")  | `  
    Foreach-Object { if (-not (Test-Path ("E:\Videos\"+$_.name))) { ` 
    Copy-Item $_.fullname -destination "E:\Videos\"}}
    You may or may not find it easier than using a program depending whether you want to keep old folder hierarchy I guess but might be handy if you don't know where the originals are and wanted to consolidate them.
    I just checked your link out of curiosity and found out my favorite duplicate file finding program dupeGuru is no longer supported for Windows. I haven't used it in awhile so I'll check later to see if it still works in Windows 10 Pro RTM and Windows 10 Pro Insider.
      My Computers


  9. Posts : 9,765
    Mac OS Catalina
       #9

    You wait until you get a message stating that there are duplicates and choose either to ignor and not copy or to replace.

    There are scripts out there that run a macro that will look for oldest vs newest, then replace the oldest.
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 19:14.
Find Us




Windows 10 Forums