How can I delete all the files from the cache?
or How can I reinitialize the cache?
There are 2 ways to do it.
1)By changing the registry.
Add a new value named 'FormatDatabase' under HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache. From command line, you can do it as below.
cmd> REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache /v FormatDatabase /t REG_DWORD /d 1 /f
Cache will not be reset with every reboot of the machine as the FormatDatabase value will be deleted from the registry after the first reboot.
2)Go to My computer -> Tools -> Folder Options -> Offline Files
Press CTRL+Shift and click on Delete Files
Note that in both the ways cache will be deleted only after restarting the machine.
The share I made offline has been moved to a new server but offline files is trying to synchronize with the old server. Is there any way to make it sync with the new server? I do not want to delete the files and begin everything from scratch with the new server?
There is a tool called csccmd.exe to do it.
csccmd.exe /moveshare:\\oldserver\oldshare \\newserver\newshare
Note that this command does not move the data from the old server to the new server. It just updates offline files tables with the new share path. You need to ensure that you have all the data copied to the new server before you run the above command.
My offline files folder is in c:\windows. My c:\ drive has become full, I want to move the csc folder to e:\drive which has lot of free space. I also want to copy the existing files to the new location. How to do it?
You can move the CSC folder to a new location by changing the value of 'DatabaseLocation' under
From command line, you can do it as below.
cmd> REG ADD HKLM\Software\Microsoft\Windows\CurrentVersion\NetCache /v DatabaseLocation /t REG_SZ /d /f
This just changes the offline files folder location for future. The old files which were copied in the past will still be in the old location and Offline files will not consider those files as offline. To move the already cached files to the new location use the tool cachemov.exe
Cachemov.exe can be downloaded from http://www.computerperformance.co.uk/ScriptsGuy/cachemov.zip
Below is a snapshot taken while cachemov.exe is executing.