general

Offline Files Not Available

Resolution Checklist

  • 1 Understand Files On-Demand and Offline Access
  • 2 Force Windows Client to Download and Pin Offline Folders
  • 3 Fix macOS Smart Sync and Storage Optimization Blocks
  • 4 Repair Virtual Drive Cache Database Failures
  • 5 Summary Quick Reference Checklist

Offline Files Not Available

“Offline Files Not Available” describes a failure where files configured to be accessible without an internet connection revert to virtual placeholders or show errors like “File could not be opened offline” when network access is lost. This is often caused by virtual drive driver crashes, or operating system storage cleanup engines deleting local file caches.

This guide explains how to pin directories to local storage, configure OS exclusions, and fix caching errors on both Windows and macOS.


1. Understand Files On-Demand and Offline Access

To save disk space, modern cloud clients use virtual file systems. Issues occur due to:

  • Virtual File Placeholders: The file icon is visible, but the actual file size on disk is 0 bytes. It must download on-demand, which fails when offline.
  • Storage Sense / macOS Optimize Storage: OS cleaning tools identifying cached cloud files as “inactive” and deleting the local copies to reclaim disk space.
  • File System Driver Failure: Windows Cloud Files API (clfs.sys) or macOS FileProvider domain crashing, breaking the bridge to the cached files.

2. Force Windows Client to Download and Pin Offline Folders

On Windows, you can force the OS to download all cloud files and apply the NTFS pinning attribute.

A. Pin Files Locally via PowerShell

Use the PowerShell attrib command to explicitly mark folders as “Pinned” (forces local download and prevents deletion):

  1. Search for PowerShell in the Start Menu, right-click, and select Run as Administrator.
  2. Run the pinning command on your cloud folder:
    # Mark the local OneDrive folder to be fully downloaded and pinned
    attrib.exe +pin "$env:UserProfile\OneDrive\*" /s /d
    • +pin forces the files to remain offline-ready.
    • /s processes matching files in the current folder and all subfolders.
    • /d processes folders as well.

B. Disable Windows Storage Sense Overrides

Windows Storage Sense will automatically dehydrate pinned files if space is low. Exclude cloud files:

  1. Open Settings > System > Storage.
  2. Click Configure Storage Sense or run it now.
  3. Under OneDrive (or other cloud drives), change “Content will become online-only if not opened for more than:” to Never.

3. Fix macOS Smart Sync and Storage Optimization Blocks

On macOS, files are managed by the Apple FileProvider API. Adjust optimization settings and force caching downloads.

A. Disable macOS “Optimize Mac Storage”

This feature offloads cached cloud files to Apple servers when local disk space runs tight.

  1. Open System Settings > click your Apple ID (top sidebar).
  2. Select iCloud.
  3. Toggle OFF the option for Optimize Mac Storage.

B. Force macOS Terminal Download of Cloud Files

You can force macOS to download the full binary content of virtual files in a directory using the system utility fileproviderctl or standard shell reads:

  1. Open Terminal (via Spotlight).
  2. Force download the sync folder (example for OneDrive / CloudStorage):
    # Read all files recursively to force download them from the virtual mount
    find ~/Library/CloudStorage/ -type f -exec head -c 1 {} + > /dev/null

4. Repair Virtual Drive Cache Database Failures

If files are configured for offline access but return errors when opened, the local cache index is corrupt.

Clean and Re-initialize Cache Database

  • OneDrive:
    :: Reset OneDrive sync settings and force redownload of metadata
    %localappdata%\Microsoft\OneDrive\onedrive.exe /reset
  • Google Drive: If using “Stream files”, switch to “Mirror files” in Google Drive Settings. Mirroring downloads a full physical copy of all files to your local drive instead of streaming them virtual.

5. Summary Quick Reference Checklist

Action TargetOperating SystemTerminal Command / PathExpected Outcome
Pin Files (attrib)Windowsattrib.exe +pin <path>\* /s /dForces download of files and sets the pin flag.
Disable Storage SenseWindowsSettings > Storage > Storage SensePrevents Windows from removing downloaded cloud files.
Disable Optimize StoragemacOSSystem Settings > iCloudDisables macOS automated cloud file deletion.
Force macOS DownloadmacOSfind <path> -type f -exec head...Reads file headers to trigger FileProvider download.
Switch to MirroringGoogle DriveClient Settings > Sync OptionsSwitches Google Drive from virtual streaming to local physical sync.
Reset Client SyncWindows/macOSClient PreferencesRe-downloads the index of offline metadata.