Are there any particular libraries/modules I should use for this other than OS? I'm a beginner.
I have multiple directories which contain backups of many files ("organized" in a chaotic mix of many directories and files). Some of the files are unique, but most of the files are duplicates. I have some of the files on my hard drive already, but not all of them.
I want to gather all the unique files from the backups. If I already have these files (name is the same, file type is the name, file size is the same), then I can delete the backup file. If I do not yet have the backed up file, then I want to move it into my hard drive. In the end, I will destroy the backups, and my hard drive will have one copy of every file with no duplicates.
Here is an example:
My Hard Drive contains the following files: [apple, banana, pear]
Backup A contains the following files: [apple, pear, peach, tomato, carrot]
Backup B contains the following files: [apple, banana, pear, peach, tomato, carrot, potato]
Backup C contains the following files: [apple, banana, pear, peach, tomato, carrot, potato, celery]
In the above example, my program would first copy peach, tomato, and carrot from Backup A to My Hard Drive, and then delete Backup A. Then it would copy potato from the second hard drive, and delete Backup B. Then it would copy celery from Backup C, and delete Backup C.