diff --git a/duplicate_dirs.py b/duplicate_dirs.py new file mode 100644 index 0000000..1e9cb8d --- /dev/null +++ b/duplicate_dirs.py @@ -0,0 +1,14 @@ +from voussoirkit import spinal + +basenames = {} + +walker = spinal.walk_generator('.', yield_directories=True, yield_files=False) +for directory in walker: + basenames.setdefault(directory.basename, []).append(directory) + +for (basename, dupes) in basenames.items(): + if len(dupes) == 1: + continue + for dupe in dupes: + print(dupe.absolute_path) + print()