Datasets:
File size: 872 Bytes
0a7933d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | 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)
|