πŸ“„

Folder Index Generator

Scan a massive folder structure and generate an Excel inventory (Name, Link, Size, Date) of every file inside.

Document ⭐ Beginner ⏱️ 3 minutes

😫 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

  1. Copy Prompt -> Paste -> Run.
  2. Select Drive/Folder -> Generate.

Related Workflows

Explore other categories

πŸ“¬

Get Started with Agentic Working

Subscribe to receive updates from AgenticWorking.io

πŸ“– Free eBook Guide πŸ“¦ 7 Ready-to-use Scripts πŸ”” Weekly Tips

No spam, unsubscribe anytime. Join 1,000+ subscribers.