"""Drive 2 triage — find net-new high-value folders not present on drive 1.""" import csv WIZ = 'clients/valleywide/app-modernization/WizTree_20260516173603.csv' # Folders whose leaf name (last path component) we want to size LEAVES = { 'darv-win7-pc', # likely Darv's actual Win7 backup '98_server', '000_asource', 'darv', 'kingston', 'full', 'virtualbox', 'vm_vdi', } PARENT_HINTS = { 'archive', # D:\Archive\ — backup root 'office-archive', 'office-estimates', } # Also look for ALL source-relevant file types unique to this drive hits = [] all_vbp_by_path = [] 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) < 7: continue p = row[0] if p.endswith('\\'): leaf = p.rstrip('\\').rsplit('\\', 1)[-1].lower() if leaf in LEAVES: try: sz = int(row[1]); files = int(row[5]); folders = int(row[6]) except (ValueError, IndexError): continue hits.append((sz, files, folders, row[3], p)) else: if p.lower().endswith('.vbp'): # Capture only VWP/Orders-relevant projects (not SDK samples) pl = p.lower() if 'seagat' in pl or 'samples\\code' in pl: continue try: sz = int(row[1]) except (ValueError, IndexError): continue all_vbp_by_path.append((row[3], sz, p)) hits.sort(reverse=True) print('=== Sizing key folder leaves ===') print(f'{"GB":>8} {"Files":>8} {"Folders":>7} Modified Path') for sz, files, folders, mod, p in hits[:40]: print(f'{sz/1024/1024/1024:>8.2f} {files:>8} {folders:>7} {mod:<19} {p}') print() print('=== ALL VWP/Orders .vbp files in D:\\Archive\\Darv-Win7-PC\\ ===') for mod, sz, p in sorted(all_vbp_by_path, reverse=True): if '\\archive\\darv-win7-pc\\' in p.lower(): print(f'{mod} {sz:>6}b {p}') print() print('=== ALL .vbp files in Darv\\000_ASource\\ (any drive location) ===') for mod, sz, p in sorted(all_vbp_by_path, reverse=True): if '\\darv\\000_asource\\' in p.lower(): print(f'{mod} {sz:>6}b {p}')