# OneDrive Files On-Demand: where the bytes actually are

> What the three file states mean, why freeing space is not deleting, and what happens to your data when the account goes away.

**Tested on**

- Build: 26300.9457
- Edition: Pro (26H2)
- Architecture: x64
- Evidence: E1
- Verified: 2026-10-29

## The short answer

With **Files On-Demand**, a file in your OneDrive folder has three states:

| Icon | State | On disk? |
|---|---|---|
| Cloud outline | **Online-only** | a placeholder, no content |
| Green check | **Locally available** | content cached, may be evicted |
| Solid green / pin | **Always keep on this device** | content stays |

"Free up space" changes the state; it does **not** delete anything. The file remains in OneDrive and re-downloads when opened.

## Why this matters more than it sounds

- **Backup tools** that walk the folder may see thousands of placeholder files and back up nothing useful — or trigger a full download.
- **Search tools** may not read online-only files.
- **Disk space reporting** counts only the states that hold content.
- **Copying the folder to a USB drive** silently downloads everything.

```powershell
# what OneDrive is doing locally
Get-Process OneDrive -ErrorAction SilentlyContinue | Select-Object Id,StartTime
Get-ChildItem "$env:USERPROFILE\OneDrive" -Force -ErrorAction SilentlyContinue |
  Select-Object -First 20 Name,Attributes,Length
```

Files with the `Offline` / reparse-point attribute are placeholders; `Length` may be 0 for an online-only file even though the real file is large.

## The three settings that matter

1. **Files On-Demand** — must be on for placeholders to exist at all.
2. **Always keep on this device** — pin what you need offline (a project folder, not the whole drive).
3. **Free up space** — evicts content, keeps the placeholder.

The default behaviour — "let Windows decide" — is what produces the surprise: a folder you used last month is empty on a plane.

## What happens when the account goes away

This is the part people learn too late:

- **Signing out** of OneDrive does not delete local files, but placeholders become unreadable.
- **Unlinking** a work account can remove access to files that were never downloaded.
- **Deleting** in OneDrive deletes in the folder, and then in the cloud.

> **Caution: A OneDrive folder is not a backup**
>
> Sync propagates deletion and ransomware encryption as faithfully as it propagates edits. Keep a separate backup that OneDrive cannot reach — see [backup that survives ransomware](https://winbook.fyi/en/windows/security/backup/).

## Check before you travel or wipe

```powershell
# force a folder offline-available (pin) - example path
# right-click the folder -> "Always keep on this device"
Get-ChildItem "$env:USERPROFILE\OneDrive" -Recurse -Force -ErrorAction SilentlyContinue |
  Measure-Object -Property Length -Sum |
  Select-Object Count,@{n='GB';e={[math]::Round($_.Sum/1GB,2)}}
```

That sum counts only content actually on disk. If it is far below what you expect, most files are placeholders.

## Related

- [File Explorer in Windows 11](https://winbook.fyi/en/windows/files/explorer/)
- [Storage Sense and Disk Cleanup](https://winbook.fyi/en/windows/files/storage-sense/)
- [Backup that survives ransomware](https://winbook.fyi/en/windows/security/backup/)

## Lab boundary

E1. The On-Demand model is documented by Microsoft. The lab VMs do not sign in to a OneDrive account, so no placeholder behaviour was reproduced here.

## Sources

- [Microsoft Learn — What is new in Windows 11](https://learn.microsoft.com/en-us/windows/whats-new/windows-11-overview)
- [Microsoft Learn — Windows Shell](https://learn.microsoft.com/en-us/windows/win32/shell/)
- [Microsoft Learn — OneDrive documentation](https://learn.microsoft.com/en-us/onedrive/)

---

Source: https://winbook.fyi/en/windows/files/onedrive-files-on-demand/
