matchgeodem / scripts /cleanup_aux_xml.py
paeslemesa's picture
Updated statcs/ splis/ and scrips/
0a7933d verified
Raw History Blame Contribute Delete
872 Bytes
import os
from pathlib import Path
def remove_aux_xml_files(dataset_path):
"""Remove all QGIS-generated .aux.xml files from the dataset."""
dataset_path = Path(dataset_path)
removed_count = 0
print("=" * 70)
print("MatchGeo-DEM .aux.xml Cleanup")
print("=" * 70)
# Walk through all directories
for root, dirs, files in os.walk(dataset_path):
for file in files:
if file.endswith('.aux.xml'):
filepath = Path(root) / file
print(f"🗑️ Removing: {filepath}")
filepath.unlink()
removed_count += 1
print(f"\n✅ Removed {removed_count} .aux.xml files")
print("=" * 70)
return removed_count
if __name__ == "__main__":
dataset_path = "/home/sabrina/Documents/Tese/05_Dataset/MatchGeo-DEM-v1/data"
remove_aux_xml_files(dataset_path)