# OneDrive Known Folder Move (KFM) — hijack and removal

## The symptom
File Explorer shows TWO parallel folder trees:
- "Rob - Personal" (cloud icon) with its own Documents/Desktop/Pictures
- Standard system folders below with the same names

User sees two "Documents" entries and must remember which is real. Rob: "hate it, want rid of it."

## What KFM does
Silently redirects Documents/Desktop/Pictures into `C:\Users\<user>\OneDrive\...` and presents the OneDrive copy as primary. Apps that resolve "Documents" via shell APIs get the OneDrive path, not the local one.

## Consequences observed (2026-08-06)
- Obsidian vault at LOCAL `C:\Users\Rob\Documents\Obsidian Vault` was invisible to apps defaulting to shell "Documents" (resolves to OneDrive)
- Claude Cowork attach dialogs kept landing in the wrong tree
- A structured agency workspace accumulated at `OneDrive\Microsoft Copilot Chat Files\Desktop\Cowork` for months because OneDrive was the default save path
- "Can't connect" errors from Copilot/OneDrive nagging about the deleted folder

## Rob's decision: uninstall OneDrive entirely
Chose "nuke it" over surgical KFM disable.

## Removal steps
1. **Check for unique files** — look in `C:\Users\Rob\OneDrive\Documents`, `Desktop`, `Pictures` for anything that exists nowhere else. Move to local first.
2. **End OneDrive processes** — Task Manager: `OneDrive.exe`, `Microsoft OneDrive Sync Service`, `Microsoft OneDriveFile Co-Authoring Executable`. Note: OneDrive may have NO tray icon while running — Task Manager is the check.
3. **Uninstall** — `appwiz.cpl` → Microsoft OneDrive → Uninstall
4. **Delete leftovers** — `C:\Users\Rob\OneDrive` (whole folder), `AppData\Local\Microsoft\OneDrive`, `AppData\Roaming\Microsoft\OneDrive`
5. **Restore Documents location** — right-click Documents (system section, not Rob-Personal) → Properties → Location tab → Restore Default
6. **Re-point apps** — anything that cached the OneDrive path (Cowork attachments, browser download folders) needs manual re-pointing after

## Gotcha: folder locks on delete
If "can't delete as open in another program": close Notion, Claude Desktop, and pause OneDrive sync first. The OneDrive path may still be held by apps that had it open.

## ⚠️ AppData near-miss (2026-08-06) — read before directing any AppData delete
When told to delete `AppData\Local\Microsoft\OneDrive`, Rob initiated a delete of `AppData\Local` itself and cancelled mid-flight. He survived (Claude/Chrome/vault intact) but Pictures content was lost. For ANY AppData delete: give the full absolute path in the paste block, prefer rename-first (`ren "<path>" "OneDrive-DELETED"`) over `rmdir /s /q`, and state plainly "AppData holds ALL your app settings — we touch only the OneDrive subfolder."

## Post-uninstall breakage actually observed (2026-08-06)
Deleting the OneDrive tree orphans any shell folder that was KFM-redirected into it:
- **Desktop icons vanish** (Desktop pointed into the deleted tree)
- **Pictures folder ceases to exist** (it only lived inside OneDrive) and drops out of the Explorer sidebar

Recovery recipe is in SKILL.md Rule 6: mkdir the six user folders → repoint `User Shell Folders` registry (Desktop / Personal / "My Pictures") → restart Explorer → verify with `reg query` + `dir`. If a folder still won't show in the sidebar, rebuild `%APPDATA%\Microsoft\Windows\Libraries\<Name>.library-ms` — and write the XML via `notepad <file>`, never by pasting XML into cmd (each line executes and errors "The syntax of the command is incorrect").
