π« The Pain Point
You have a hard drive from 2010 with 10,000 nested files. You need to know whatβs in there without clicking through every folder. Or your Boss: βGive me a list of all contracts on the server.β
π Agentic Solution
Drive Crawler: Recursively walks through every subfolder and logs file details into Excel.
Key Features:
- Hyperlinks: Clicking the filename in Excel opens the actual file.
- Tree View: Flattens a deep structure into a readable list.
βοΈ Phase 1: Commander (Quick Fix)
For a quick lookup list.
Prompt:
βList all files in the current directory and subdirectories. Save the Filename, Path, and Size to
File_Index.csv.β
Result: A CSV inventory.
ποΈ Phase 2: Architect (Permanent Tool)
For IT Admins.
Engineering Prompt:
**Role:** Python GUI Developer (PyQt6 Specialist)
**Task:** Create "Disk Indexer Pro" Desktop App
**Objective:** A high-speed file system scanner that generates searchable Excel catalogs of drive contents.
**Tech Stack:**
* Language: Python 3.10+
* GUI Library: PyQt6 (Cross-platform)
* System: os, pathlib, pandas
* Packaging: PyInstaller
**Functional Requirements:**
1. **UI Layout (PyQt6):**
* **Target:** Button to Select Root Folder.
* **Filters:** Checkboxes for "Calculate Folder Sizes" (Slow), "Hash Files" (Very Slow).
* **Status:** "Scanning: C:/User/Docs/..." (Real-time path display).
* **Action:** "Generate Excel Report".
2. **Core Logic:**
* Recursive `os.walk` or `os.scandir` (optimized).
* Accumulate metadata (Name, Ext, Size, Mtime, Path).
* Write to Excel with Hyperlink formulas.
* **Threading:** Critical. Scanning must happen in background thread to keep UI responsive.
3. **Deliverables:**
* `main.py`: Complete source code.
* `requirements.txt`: Dependencies.
* **Build Instructions:**
* Windows: `pyinstaller --onefile --noconsole main.py`
* macOS: `pyinstaller --windowed --noconsole main.py`
π§ Prompt Decoding
- Hyperlink: Making the Excel βClickableβ transforms dead data into a live dashboard. Just merging the text path isnβt enough; using the Excel formula functionality creates a superior UX.
π οΈ Instructions
- Copy Prompt -> Paste -> Run.
- Select Drive/Folder -> Generate.