Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. from filecmp import dircmp
  2.  
  3. def diff_files(dcmp):
  4. for name in dcmp.diff_files:
  5. print "diff_file %s found in %s and %s" % (name, dcmp.left, dcmp.right)
  6. # copy file to backup dir here
  7. for sub_dcmp in dcmp.subdirs.values():
  8. print_diff_files(sub_dcmp)
  9.  
  10. dcmp = dircmp('dir1', 'dir2')
  11. diff_files(dcmp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement