"""Drive 3 — find SourceSafe artifacts + size up the VWIN7 and VWP-FIN top-level dirs that weren't on drive 1.""" import csv WIZ = 'clients/valleywide/app-modernization/WizTree_20260516174356.csv' ss_hits = [] top_level_sizes = {} # path -> (size, files, folders, mod) TARGETS = { r'D:\VWIN7\\', r'D:\VWP-FIN\\', r'D:\Archive\\', r'D:\WIN7-Orders\Darv-2\\', } with open(WIZ, encoding='utf-8-sig', errors='replace') as f: r = csv.reader(f); next(r); next(r) for row in r: if not row or len(row) < 4: continue p = row[0] pl = p.lower() if pl.endswith('srcsafe.ini') or pl.endswith('.scc'): try: sz = int(row[1]) except (ValueError, IndexError): sz = 0 ss_hits.append((row[3], sz, p)) if '\\sourcesafe' in pl or '\\vss\\' in pl: try: sz = int(row[1]) except (ValueError, IndexError): sz = 0 ss_hits.append((row[3], sz, p)) if p.endswith('\\') and p in TARGETS: try: sz = int(row[1]); files = int(row[5]); folders = int(row[6]) top_level_sizes[p] = (sz, files, folders, row[3]) except (ValueError, IndexError): pass print('=== Top-level dirs unique-ish to drive 3 ===') print(f'{"GB":>8} {"Files":>8} {"Folders":>7} Modified Path') for path, (sz, files, folders, mod) in sorted(top_level_sizes.items()): print(f'{sz/1024/1024/1024:>8.2f} {files:>8} {folders:>7} {mod:<19} {path}') print(f'\n=== SourceSafe artifacts ({len(ss_hits)} matches, top 50) ===') ss_hits.sort(reverse=True) seen_paths = set() for mod, sz, p in ss_hits[:50]: # Dedupe by leaf path (snapshots often duplicate) leaf_key = p.lower().split('\\estimating archive')[-1] if 'estimating archive' in p.lower() else p.lower() print(f'{mod} {sz:>8}b {p}')