Environment:
- OS: Windows 11
- App: iCloud for Windows (Microsoft Store version)
- Total Items: ~31,000 files
Issue:
For an extended period, iCloud Drive stopped syncing completely. The sync queue got stuck on "2 items remaining" (or stuck initializing), accompanied by the error message:
"Some items in iCloud Drive cannot be synced. The folder information is incomplete or unavailable."
Even after restarting, the sync engine would freeze or time out, preventing thousands of files from syncing.
Root Cause
- Mac system leftovers (.Trash folders, ._* AppleDouble files, and .DS_Store):
- These hidden files/directories created by macOS/iOS were being monitored by the Windows iCloud client. Attempting to sync or touch them caused cloud operations to time out because their metadata was invalid or unresponsive on the server side.
- Naming convention violations in Windows:
- A few files had broken naming formats (e.g., a file named simply .pdf with no base name, or a folder with an unclosed bracket). Because iCloud syncs in sequence, these non-compliant items blocked the entire queue.
How I Resolved It (Step-by-Step)
- Cleaned up Mac metadata:
- Removed all unnecessary ._* AppleDouble resource forks and .DS_Store files across the iCloud Drive directory using PowerShell.
- Identified and moved invalid files:
- Located files violating Windows naming conventions (such as the extension-only .pdf file) and moved them out of the iCloud Drive directory to the Desktop.
- Forcefully removed stuck .Trash folders:
- When attempting to delete .Trash directories while iCloud was running, Windows threw an error:
- The cloud operation did not complete before the time-out period expired.
- To bypass this:
- Completely terminated all iCloud processes via Task Manager / PowerShell (Stop-Process -Force).
- With the file locks released, permanently removed the corrupted .Trash directories from the local drive via command line (cmd /c rd /s /q).
- Restarted iCloud:
- Relaunched the iCloud app. The sync engine immediately initiated a clean re-indexing pass (Initializing • 31,461 items).
Result:
The timeout errors are gone. The status icons in File Explorer switched back to active syncing (blue sync icons) and are now successfully completing (green checkmarks).
If your iCloud for Windows client is indefinitely stuck on a small number of items, check for hidden .Trash folders and files with invalid Windows characters or missing base names—they are likely stalling the sync loop.