Skip to content

Detect saved file paths and offer save-in-place #1

@djdarcy

Description

@djdarcy

Summary

Detect whether a Notepad tab is already saved to a file on disk, and capture the full file path when available. This enables two key workflows:

  1. Save-in-place: Instead of extracting to a new file, offer to update the original file
  2. Better naming: Use the actual filename for organization instead of generating a name from content

Context

Windows 11 Notepad exposes saved-file information through:

  • Window title: Shows filename (e.g., notes.txt - Notepad) but not the full path
  • UIA TabItem.Name: Each tab's name property shows the filename or "Untitled" for new tabs
  • Modified indicator: * prefix in title means unsaved changes

The full file path may be available via:

  • UIA Document control's Value or LegacyAccessibleValue property
  • Windows Shell APIs / Recent Files
  • Notepad's internal state (harder to access)

Proposed Behavior

During extraction:

  • Tag each tab with saved_path: "C:\path\to\file.txt" or saved_path: null (new/unsaved)
  • Include this in manifest.json metadata

During organization:

  • For tabs with a known save path, prompt: "This tab is already saved at C:\docs\notes.txt — skip, overwrite, or copy to organized folder?"
  • Default: skip already-saved files (user already has them)
  • Flag: --include-saved to include saved files in organization anyway

Tasks

  • Spike: determine which UIA properties expose the full file path
  • Add saved_path field to extraction metadata
  • Add UIA TabItem.Name capture for each tab (not just window title)
  • Update CLI with --include-saved / --skip-saved flags
  • Update organize prompt to use real filenames when available

Analysis

See 2026-02-14__00-42-51__full-postmortem_notepad-cleanup-v0.1.0-extract-organize-pipeline.md for extraction architecture details.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestextractionText extraction from NotepadfeatureNew feature

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions