Reset Offline Files cache

For my reference, mostly…

In Windows XP: In Explore’s Tools → Folder Options → Offline Files, then press CTRL+SHIFT and click the “Delete Files” button. How Macintosh is that? I’ve had to perform that maneuver a few times. With Windows Vista and later, the reworked Offline Files facility has worked much better. But occasionally, the Offline Files database still gets munged.

NOTE: Once you set the value and reboot, all the content in the Offline Files cache for all accounts on the system is purged. You need to perform a sync operation in order to populate your files into the Offline Files cache again.

If you have files in the Offline Files cache that haven’t been successfully synced to the server, those files will be lost. For this reason, I will often make a local copy of “My Documents” to another folder on C: (e.g.: c:\temp\MyDocsCopy) while the network interfaces are disabled, to make sure I’m copying data from the cache. It never hurts to create a backup.

In Windows 7 and 8, the process requires setting a single registry value:

To reinitialize the Offline Files cache, create the following DWORD registry value with a value of 1 and restart the system.

HKLM\System\CurrentControlSet\Services\CSC\Parameters\FormatDatabase

Note that you will have to create the Parameters key, and any unsynchronized changes will be lost.  In addition, any files and folders pinned by means other than Folder Redirection or Group Policy will no longer be pinned on that client.

The setting of this registry value may be automated using REG.EXE.

In an elevated command prompt, run the following command.

REG ADD "HKLM\System\CurrentControlSet\Services\CSC\Parameters" /v FormatDatabase /t REG_DWORD /d 1 /f

http://support.microsoft.com/kb/230738
http://social.technet.microsoft.com/wiki/contents/articles/1073.robocopy-and-a-few-examples.aspx

Geoff
Sr. System Administrator at the University of Vermont

3 Comments

  1. Updated with current OSes, and more clear warnings about the potential for data loss for unsynced files.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.