Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from filecmp import dircmp
- def diff_files(dcmp):
- for name in dcmp.diff_files:
- print "diff_file %s found in %s and %s" % (name, dcmp.left, dcmp.right)
- # copy file to backup dir here
- for sub_dcmp in dcmp.subdirs.values():
- print_diff_files(sub_dcmp)
- dcmp = dircmp('dir1', 'dir2')
- diff_files(dcmp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement