Understanding the Discrepancy
The issue where OneDrive reports an incorrect folder size is rarely a data loss event. Instead, it is a synchronization lag between the local file system metadata and the cloud-based inventory. When you create, move, or delete large numbers of files, the OneDrive sync engine may not immediately update the total byte count displayed in the user interface. This is particularly common after bulk operations or when network connectivity fluctuates during the background upload process.
Another contributing factor is the way Windows Explorer integrates with OneDrive. The shell extension that populates folder properties relies on cached data for performance. If this cache becomes corrupted or stale, the size attribute returned to the operating system will be wrong. It is important to distinguish between the actual storage used in your account and the visual representation in your file explorer. Your files are likely safe, but the number shown next to the folder name is misleading.
Forcing a Manual Sync Check
The first step in troubleshooting this bug is to ensure the sync engine has had sufficient time to process recent changes. Sometimes, simply pausing and resuming the sync forces a refresh of the metadata database. To do this, locate the OneDrive cloud icon in your system tray near the clock. Right-click the icon to open the context menu and select the gear icon for Settings.
- Navigate to the Account tab within the settings window.
- Click on Choose folders to view your synced locations.
- Select Pause syncing for a duration of two minutes.
- Return to the same menu and click Resume syncing.
This action clears the immediate queue and prompts the client to re-evaluate the file states. Wait for the sync indicator to return to a steady white cloud or green checkmark. Once the status stabilizes, right-click the problematic folder in File Explorer and select Properties. The size field should now reflect a more accurate calculation based on the current cloud state.
Clearing Local Cache Files Correctly
If the pause and resume method does not correct the size display, the local cache holding the metadata might be corrupted. Contrary to older advice suggesting deletion of temporary files, the most effective method involves resetting the OneDrive application itself using its built-in command-line utility. This approach is safer and more targeted than manually hunting for obscure cache folders.
Close OneDrive completely by right-clicking the tray icon and selecting Quit OneDrive. Then, press Windows Key + R to open the Run dialog. Type the following command exactly as written, ensuring you include the tilde character:
%LOCALAPPDATA%\Microsoft\OneDrive\onedrive.exe /reset
After entering this command, the OneDrive icon in your system tray will disappear briefly and then reappear. This indicates that the reset process is initializing. You may need to wait up to ten minutes for the application to rebuild its local index and reconnect to the server. During this time, do not interact with the files, as the engine is rebuilding its internal database of file attributes and sizes.
If the automatic reset fails to launch, you can perform a manual reset by running the executable with the reset flag again, or by unregistering and registering the DLLs associated with the client. However, the single command above resolves the majority of metadata corruption issues that lead to incorrect size reporting.
Verifying Cloud Storage vs Local View
To confirm whether the bug was purely a local display issue or a deeper sync problem, compare the local folder size with your online account usage. Log in to OneDrive via a web browser and navigate to the same directory. Note the size reported there. If the web interface shows the correct size while your desktop still shows the old value, the issue is isolated to the local shell extension.
In such cases, restarting Windows Explorer can help force the UI to refresh. Open Task Manager, find Windows Explorer, and select Restart. This action reloads the shell extensions and often updates the property dialogs immediately. For users who frequently encounter these discrepancies, keeping your Windows OS and OneDrive client updated is crucial, as Microsoft regularly patches these indexing bugs in newer releases.
Additionally, if you are managing complex structures involving linked drives, ensure that your configuration aligns with standard behaviors to avoid further anomalies. For related issues regarding folder handles and linked PC behaviors, you may find helpful insights in our guide on Forcing OneDrive to Accept Folder One-Handles. Similarly, if you suspect save location conflicts are contributing to metadata errors, reviewing Does Excel still save to local folders when configured for OneDrive? can clarify how application-specific saves impact overall folder metrics.
Frequently Asked Questions
Why does my OneDrive folder size change randomly?
Random changes usually indicate active background syncing or temporary file creation by applications like Office. These transient files add to the local size until they are either uploaded or deleted, causing the displayed metric to fluctuate rapidly.
Is it safe to delete the OneDrive cache manually?
Manual deletion of cache folders is risky and often ineffective because the client regenerates them immediately. Using the built-in /reset command is the supported method to clear these artifacts safely without breaking the sync connection.
How long does it take for OneDrive to update folder sizes?
Updates can take anywhere from a few minutes to several hours depending on the number of files and network speed. Large batches of new files require the engine to traverse the entire directory structure, which is a resource-intensive process.
Can third-party antivirus software cause size inaccuracies?
Yes, if antivirus software scans OneDrive files extensively, it may lock files or delay metadata updates. This interference can cause the sync engine to report outdated sizes until the scan completes and locks are released.
What should I do if the reset command does not work?
If the reset command fails, uninstall and reinstall the latest version of OneDrive from the official Microsoft website. This ensures that all components, including the shell extensions responsible for size calculations, are restored to their default state.