I have two folders, each of which contains about 10,000 files. I would like to write a script or program that can tell me if these folders are synchronized, and then tell me which files are missing from each one in order to synchronize them.
Therefore, after generating a list of files, what is the fastest algorithm sorts them for unique files? What I think now is comparing the first file in each list, then if they are different, delete one until they become the same, and then remove both from the list (because they are not unique.)
Is there a faster algorithm?
source
share