OneDrive Files On-Demand

On this page 7

OneDrive Files On-Demand is a Windows feature that presents every file stored in OneDrive or SharePoint in File Explorer as if it were local, while keeping the actual content in the cloud until a user or application opens it. Within Windows storage & file systems, it is the main example of placeholder-based cloud storage: the namespace is fully local, but the data is hydrated on demand.

The feature lets a device with a small SSD browse terabytes of cloud content, and it gives administrators a way to control how much synchronized data actually occupies disk space.

How placeholders and the Cloud Files API work

Files On-Demand is built on the Windows Cloud Files API and its kernel-mode cloud filter driver, cldflt.sys, introduced in Windows 10 version 1709. The OneDrive sync client registers a sync root with the operating system, and each cloud file is represented on an NTFS volume by a placeholder: a file with full metadata such as name, size and timestamps, but with no data stored locally.

When an application reads a placeholder, the cloud filter driver intercepts the I/O request and asks the sync client to fetch the content. This process is called hydration. The application simply waits for the data, so most programs work without any awareness that the file was remote. Removing the local content again while keeping the placeholder is called dehydration.

Placeholders depend on NTFS reparse points. For this reason, the OneDrive folder must reside on an NTFS volume; FAT32, exFAT and network shares cannot host a Files On-Demand sync root.

The table below summarizes the components involved in a hydration request.

ComponentRoleLocation
Cloud filter driverIntercepts access to placeholdersKernel mode, cldflt.sys
Sync rootRegistered folder managed by a providerUser profile, OneDrive folder
PlaceholderMetadata-only file with a reparse pointNTFS volume
Sync providerDownloads and uploads file contentOneDrive.exe in user mode
Shell integrationShows status icons and context menuFile Explorer
Components behind Files On-Demand

File states and their status icons

Every item in a Files On-Demand folder is in one of three hydration states, shown in the File Explorer status column. Understanding these states is essential, because they decide whether a file is available without an internet connection.

StateIconLocal disk useOffline access
Online-onlyBlue cloudMetadata onlyNot available
Locally availableGreen check in white circleFull contentAvailable until space is freed
Always keep on this deviceWhite check in green circleFull content, pinnedAlways available
Files On-Demand states

Opening an online-only file turns it into a locally available file. Selecting “Free up space” dehydrates it back to online-only, while “Always keep on this device” sets the pinned attribute, which prevents Storage Sense and the sync client from dehydrating it. The states map to file attributes that can be set from the command line with attrib +P for pinned and attrib +U for unpinned.

How Files On-Demand compares with other storage approaches

Files On-Demand is often confused with a full sync or a backup. In reality, it is a space-saving presentation layer over a synchronized cloud copy, and it differs from neighboring Windows features in purpose and behavior.

ApproachLocal copy of dataMain purpose
Files On-DemandOnly opened or pinned filesAccess large cloud libraries on limited disks
Full sync without placeholdersEvery fileComplete offline copy
File HistoryVersioned copies on another driveLocal backup and restore
Mapped network driveNone, unless offline files are usedShared access over SMB
Storage SenseNot applicableAutomatic cleanup, including dehydration
Comparison with related approaches

Two points matter in practice. First, OneDrive is synchronization, not backup: deleting a file locally deletes it in the cloud, although the recycle bin and version history allow recovery for a limited period. Second, Storage Sense can dehydrate unused files automatically after a configured number of days, which frees space without user action.

Configuring Files On-Demand in organizations

Since OneDrive sync client builds released in 2023, Files On-Demand is on by default and cannot be turned off by users. Administrators shape its behavior through Group Policy or Intune settings for the OneDrive client, typically combined with Known Folder Move, which redirects Desktop, Documents and Pictures into OneDrive.

The following decision table lists frequent requirements and the corresponding configuration.

RequirementSetting or actionEffect
Keep laptops from filling their SSDsStorage Sense with dehydration after 30 daysUnused files return to online-only
Guarantee offline access to a project folderPin the folder with Always keep on this deviceContent stays local
Avoid large downloads on metered networksPause sync on metered connectionsHydration waits for unmetered links
Pre-populate a shared library on new devicesAutomatically sync team site libraries policyPlaceholders appear without user action
Block hydration by specific processesCloud Files API hydration block for appsPrevents mass downloads by scanners
Configuration choices for administrators

Admins should plan for bandwidth spikes when many devices first pin large folders, and for the time required to create placeholders for very large libraries, which can take hours for hundreds of thousands of items.

Limitations and common problems

Files On-Demand behaves transparently for most applications, but several edge cases cause surprises. Most of them stem from software that reads every file it encounters.

  • Antivirus and search indexers that scan file content can trigger unintended mass hydration; modern security products recognize placeholders and skip them.
  • Backup tools unaware of placeholders may back up only metadata or force a full download of the library.
  • Offline work fails silently for online-only files, so travelers must pin needed folders before departure.
  • Path and size limits apply: the full path must stay under 400 characters in OneDrive, and very large libraries strain the sync client.
  • Moving the OneDrive folder to a non-NTFS or removable drive is not supported.

When files fail to open, the usual causes are a stopped sync client, an expired sign-in session or a disabled cloud filter driver. Restarting OneDrive and checking that the CldFlt service is running resolves most of these cases.

In simple terms

OneDrive Files On-Demand works like a library catalog on your computer. You can see every book the library owns. You see its title and size. The book itself stays on the shelf in the cloud until you ask to read it.

When you open a file, Windows quietly fetches it. You can also keep important files on your device for times without internet. Files you no longer use can go back to the cloud to free up disk space. Their names stay visible in the folder.

A practical example

An architecture studio with 25 employees stores about 1.8 TB of project drawings in a SharePoint document library. Designers use laptops with 512 GB SSDs, so a full sync of the library is impossible.

With Files On-Demand, every laptop shows the complete project tree in File Explorer, but only the drawings a designer actually opens are downloaded. Before a site visit, a project lead right-clicks the current project folder and selects Always keep on this device, so about 14 GB of plans are available on the construction site without a connection.

The IT administrator enables Storage Sense to return files unused for 30 days to online-only. Average local OneDrive usage on the laptops settles at around 40 GB, and no designer runs out of disk space despite the library continuing to grow.