Compare directories on file/folder names only, printing any differences?
How do I recursively compare two directories (comparison should be based only on file name) and print out files/folders only in one or the other directory? I'm using Python 3.3. I've seen the filecmp module, however, it doesn't seem to quite do what I need. Most importantly, it compares files based on more than just the filename. Here's what I've got so far: import filecmp dcmp = filecmp.dircmp('./dir1', './dir2') dcmp.report_full_closure() dir1 looks like this: dir1 - atextfile.txt - anotherfile.xml - afolder - testscript.py - anotherfolder - file.txt - athirdfolder And dir2 looks like this: