Given 2 directories:
dir1
|
+----A
|
+----B
dir2
|
+----A (changed)
|
+----B (no change)
|
+----C (added)
I want to write a python script which will detect and make the following changes:
- copy C from
dir2todir1 - copy A from
dir2todir1
My idea is to obtain a md5 checksum for all the files. Am I going in the right direction ?
Have a look at the filecmp module.
http://docs.python.org/library/filecmp.html
It also has a function to compare directories.