filecmp.cmpfiles on directories
gmcm at hypernet.com
Wed Jun 12 14:07:32 CEST 2002
> I am trying to walk a directory structure and compare directories for
> duplicates. For some reason I get the filecmp to work on individual
> files, but not on directories.
> DOES NOT WORK:
> print dups,"||",common
For each filename in common, cmpfiles will compare the files
with that basename in the two directories. What you want
x = filecmp.dircmp("C:\\comp1","c:\\comp2")
which will figure out "common" and call cmpfiles for you.
More information about the Python-list