Windows 10: How can I make W10 warn that an identical file already exists

Discus and support How can I make W10 warn that an identical file already exists in Windows 10 Support to solve the problem; In Windows 7 and earlier, if you attempted to save a photo from a webpage and an identical file was already in the folder it alerted you to that fact.... Discussion in 'Windows 10 Support' started by Mal Capone, Jun 8, 2021.

  1. How can I make W10 warn that an identical file already exists


    In Windows 7 and earlier, if you attempted to save a photo from a webpage and an identical file was already in the folder it alerted you to that fact. In windows 10 it just saves a second copy with a (number) added to the file name. Is there any way to make windows 10 alert that an identical file already exists as with previous versions?

    :)
     
    Mal Capone, Jun 8, 2021
    #1
  2. Kreij Win User

    Identical File Finder

    @Ford
    I don't think that step #3 is even needed. The probabiliy of two MD5 hashes from differing files colliding is what, 2^-128 ?
    Even if your were hashing a million files the odds of a hash collision on differing files is astronomically small.
     
    Kreij, Jun 8, 2021
    #2
  3. Identical File Finder

    Neat idea but...I would recommend doing a 1:1 compare...

    1. If filesize is equal, move on to step two; else, not identical.
    2. Read one chunk (4096 bytes) from file A and file B into separate buffers.
    3. Use a for loop to make sure all bytes are equal: fileAbuffer == fileBbuffer
    4. If an inequality is ever discovered, break the loop, close the file streams, and output non-match. If they are equal, rince and repeat until End of File is reached.

    Using this method, you could even have a percentage match option where you count the differences and use the filesize as the denominator in creating the percent. If not above a user specified percentage (100% if not given), reject it.


    The method described above would likely be faster than md5.ComputeHash(file) on large files because it could stop on the first byte.
     
    FordGT90Concept, Jun 8, 2021
    #3
  4. Kreij Win User

    How can I make W10 warn that an identical file already exists

    Identical File Finder

    Makes sense to me. Sequential reading of a pair of arrays is fast (and of course, doesn't have to do an encryption algorithm even if the whole file is read).

    In the last scenario, it probably would be even faster as the odds of two differing files being identical for the 1MiB is unlikely also and it would find the difference sooner.

    Now get in there and optimize it more to make it even faster. *Big Grin How can I make W10 warn that an identical file already exists :D

    In a worse case scenario (let's say 5 files with a differing last byte) you would have to do full file reads 10 times for the array method, but only 5 hash runs and then do a hash List compare.
    Seems in this case they would be a lot closer.
     
    Kreij, Jun 8, 2021
    #4
Thema:

How can I make W10 warn that an identical file already exists

Loading...
  1. How can I make W10 warn that an identical file already exists - Similar Threads - W10 warn identical

  2. "Account already exist"

    in Windows 10 Gaming
    "Account already exist": I could not create a Microsoft account on my tablet so I created one on my laptop. Now every time I try to sign in on my tablet, it directs me to "Create an account" page and says that there is already an account with my email. What do I do?...
  3. "Account already exist"

    in Windows 10 Software and Apps
    "Account already exist": I could not create a Microsoft account on my tablet so I created one on my laptop. Now every time I try to sign in on my tablet, it directs me to "Create an account" page and says that there is already an account with my email. What do I do?...
  4. mklink cannot create file already exists

    in Windows 10 Network and Sharing
    mklink cannot create file already exists: Just ran into a ""we can't sign into your account" problem due to some unnecessary update that has clearly messed up my registry. Anyway, I have gone down the duplicating and restoring to a new account. Again one step forward and three back. I heavily rely in mklinks They are...
  5. mklink cannot create file already exists

    in Windows 10 Gaming
    mklink cannot create file already exists: Just ran into a ""we can't sign into your account" problem due to some unnecessary update that has clearly messed up my registry. Anyway, I have gone down the duplicating and restoring to a new account. Again one step forward and three back. I heavily rely in mklinks They are...
  6. mklink cannot create file already exists

    in Windows 10 Software and Apps
    mklink cannot create file already exists: Just ran into a ""we can't sign into your account" problem due to some unnecessary update that has clearly messed up my registry. Anyway, I have gone down the duplicating and restoring to a new account. Again one step forward and three back. I heavily rely in mklinks They are...
  7. The file or folder already exists on OneDrive

    in Windows 10 News
    The file or folder already exists on OneDrive: [ATTACH]When a file is added to OneDrive, it syncs it across devices. If you deselect a folder from OneDrive and choose to sync, you may receive an error— The file or folder already exists on OneDrive. If this happens, then it’s because of the conflict between devices and...
  8. powercfg /batteryreport "file already exists"

    in Windows 10 Ask Insider
    powercfg /batteryreport "file already exists": Currently trying to run a battery report on my HP laptop but I'm repeatedly getting the error message in both Command Prompt and PowerShell: Unable to perform operation. An unexpected error (0xb7) has occurred: Cannot create a file when that file already exists. This...
  9. Identical subfolder name exists

    in Windows 10 Network and Sharing
    Identical subfolder name exists: This is weird that I have this identical folder name. If I want to create another same folder, it will say same folder name exists. If I rename one of the duplicate folder and restore, it is allowed. What's cause this? I have view to show all hidden files, and extensions....
  10. Cannot create a file when that file already exists

    in Windows 10 Support
    Cannot create a file when that file already exists: I've been trying for hours to get this working, but it keeps giving me the same error. I'm not an expert with computers and windows. This is what i've been entering: mklink /d "C:\Program Files (x86)\Steam\steamapps\sourcemods" "D:\sorce" Please help. 156254