I assume that you're talking about duplicate dll or other files related to software function and not duplicate images of you and your uncle Joe showing off the "big one" that you caught on your last fishing trip, or a duplicate of that nasty letter you wrote but never delivered to your boss telling him just what he could do with your job and how far he could shove it.
Occasionally there can be duplicate files on a machine due to upgrading a particular software program to a newer version--or reverting back to an earlier version. New versions don't necessarily put the same files in the same locations, usually by design; but poor design if you ask me. More often than not, though, there are duplicate files on your computer because more than one program uses that particular file but in different versions. Sometimes the duplicate files are to avoid stalling, freezing, or crashing that can happen when more than one program is using the same file at the same location at the same time. That was once an aggravating issue when running two MS Office applications simultaneously or when two or more documents were open in Word, Excel, or FrontPage.
The best rule of thumb to follow when it comes to computers is, "If it ain't broke, don't fix it!"
Another rule that would serve you well is don't delete it if you don't know what it is or why it's there! DLL, SYS, EXE, CAB, and other such files are each associated with specific software programs or operating system functions. If you don't know which software programs are using them, then do yourself and the person who repairs your computer a huge favor and leave the files alone.
There have been four separate incidents where I have had to spend days tracking down and repairing problems on my wife's computer because she deleted one or more duplicate software or system files.
Unless you have upgraded a program or have uninstalled a lot of software that have left a lot of unnecessary files on your machine, odds are that both files are being used.
One exception is when you have uninstalled software that has left behind its directory and a lot of files inside the directory after rebooting. Even if you are planning to upgrade to the newer version or reinstall the software, there is no reason for the directory of an uninstalled program, or the files that it contains, to still exist. In that case, the directory and files within it may be safely deleted, particularly if you are reinstalling software that has begun to malfunction. Most malfunctions are due to corrupted (or missing) files. The file that is corrupt may be one of the files left behind after the uninstall process. In any case, all the remnant files should be deleted so the installer will have to install fresh copies of everything.
I don't care what helper software you use to aid you in the task, deleting duplicate files is not a good idea unless you know beyond question that the particular file and file version that you are deleting is no longer needed by any program on your computer.
If you have a sudden attack of Adrian Monk's Syndrome and just MUST delete one of the duplicate files or die trying, ALWAYS delete the OLDER version of the file. The exception to that rule would, of course, be if you have reverted back to an earlier version of the software that uses the earlier version of that file. Then the earlier version of the duplicate files would be the obvious one to keep. The wise thing to do, though, would be to uninstall the software that uses the file in question and see if the uninstall process deletes one of the duplicate files. If so, your problem of determining which version to keep is solved.
In order to avoid all kinds of possible problems caused by deleting the wrong file from the wrong location, deleting files from a computer, other than uninstalling a software program that you no longer want, is best left to someone who knows what he or she is doing.
Likewise with editing the registry.
Just because you don't know what it is or why it's there doesn't mean it doesn't belong.
It's true that you can't have duplicate files in the same directory, because the computer's OS won't allow it; but that doesn't mean that there can't or shouldn't be duplicate files in different directories. Sometimes that's the way it has to be for everything to be able to work correctly and work together.