| 1234567891011121314151617181920212223 |
- import os
- search_paths = [
- r"c:\Users\lanfr144\Documents\DOPRO1",
- r"c:\Users\lanfr144\Documents",
- r"c:\Users\lanfr144"
- ]
- found_paths = []
- for base_path in search_paths:
- if not os.path.exists(base_path):
- continue
- print(f"Searching in {base_path}...")
- for root, dirs, files in os.walk(base_path):
- # Limit search depth to avoid extremely long runtime
- if root.count(os.sep) - base_path.count(os.sep) > 4:
- continue
- if "am.png" in files:
- found_path = os.path.join(root, "am.png")
- found_paths.append(found_path)
- print(f"FOUND: {found_path}")
- print("Search complete. Found:", found_paths)
|