none
How to Move Offline Files Cache in Windows 7?

    Question

  • I'm using the offline files feature in Win7 (much better implementation, btw - kudos!) and I've run into a problem:  the CSC is using up all the drive space on C:\.  I'd like to move the CSC to D:\, however I've been unable to do so.

    I've seen this posted here previously (2/2009), however the response was to follow the instructions from Vista (using migwiz.exe).  When I launch migwiz.exe, I have no option of selecting the offline files as outlined in the Vista instructions (http://blogs.technet.com/filecab/archive/2006/12/12/moving-the-offline-files-cache-in-windows-vista.aspx).

    Are there any other ways of doing this?

    Thanks!

    Tuesday, July 7, 2009 4:41 AM

All replies

  • I'm seeking a solution as well. I'm unsure about migwiz as it doesn't seem to have the same options as Vista.

    Does it by default move the CSC folders, even though it isn't specified?

    I can only repartion my drives so many times, until I find the solution......
    Saturday, July 11, 2009 12:53 PM
  • I guess what I've never really understood about Offline Folders is why doesn't MS include a setting in the interface called "Offline Folders Cache Location" with text box and a Browse button?
    Saturday, July 11, 2009 3:25 PM
  • I'm in the same boat as you and would love to know how to do this. 

    I wish the "Disk Usage" tab in the "Offline Files" dialog had a button or textbox that let you specify a new location for the cache.  =\
    Wednesday, July 29, 2009 4:26 PM
  • I've posted this on superuser.com.

    I'm also looking for an answer. I had hoped this was just a Beta/RC issue but it is still a problem in the RTM.
    • Proposed as answer by Manni_uk Saturday, August 8, 2009 11:05 AM
    Saturday, August 8, 2009 2:45 AM
  • Hi everyone,

    I have found a way to move the offline cache in W7, but it means you have to reset your existing offline files, give the new location, and resync the folders in the new location.

    Here is what to do (if you haven't synchronised any offline files yet, for exemple after a clean install, you can start directly in step 3):

    0) Make sure your existing offline files are synchronised with the server, as you are going to lose ALL the offline copies and you don't want to lose any new/modified files. Make a backup if you're not sure and if the files are important.
    1) reset the content of the old cache by adding the following command in a batch file and running it (of course you can add the parameter in the registry manually, but it's quite handy to have the batch ready whenever you need to reset the cache):
    REG ADD "HKLM\System\CurrentControlSet\Services\CSC\Parameters" /v FormatDatabase /t REG_DWORD /d 1 /f
    2) Reboot, the added key will be detected, all the content of the cache will be deleted, as well as the key itself (it only resets once)
    3) Add the following registry key in the same HKLM\System\CurrentControlSet\Services\CSC\Parameters section of the registry:
    Type: REG SZ (string)
    Name: CacheLocation
    Value: the new location in NT format, ie \??\d:\csc if you want to create the new cache in d:\csc
    4) Create the folder in the new location
    5) Reboot (not sure if it's necessary, but better safe than sorry)
    6) Reselect the files/folders you want to sync offline, and they should sync in the new location.
    7) If you want to, you can delete the old cache location in c:\windows\csc by following the end of the vista procedure linked in the first post (using takeown etc)

    It worked for me (Win7 RTM x86), let us know if it works for you...

    Obviously it won't help if you don't want to / can't resynchronise, but if you're starting from scratch or don't mind resyncing from scratch, it's a good workaround.

    EDIT: if you sync a lot of files and get a lot of errors, try to reset your offline files again following the above procedure (steps 1-2), disable offline files, reboot, enable offline files, reboot, and resync your files. Again, it worked for me...
    • Edited by Manni_uk Tuesday, August 11, 2009 12:07 PM Added steps if errors when syncing a large amount of files
    • Proposed as answer by CookingFat Friday, August 14, 2009 10:17 PM
    Saturday, August 8, 2009 11:22 AM
  • What do you mean by
    \??\d:\csc

    Wouldn't just
    d:\csc
    be the same?

    I can't get it to work. When I boot after adding the new CacheLocation string then the offlinefiles service fails to start and gives an error saying the directory couldnt be found. I've been trying to get it to go to d:\Program Files\CSC (which I have created) When I remove the key it works again.

    EDIT
    Nevermind. I thought the ?? stood for a placeholder for the computer/host name. I tried it as an absolute and it worked. So FYI everyone, take it literally
    Monday, September 21, 2009 1:01 AM
  • Hi Manni_uk

    I'm using Win7 RTM x64.

    I just want to delete my existing offline cache to reclaim disk space - so I've tried running steps 1-2.  I couldn't get the batch file to work and wonder if I'm doing something wrong.  First I disabled offline files through the Control Panel.   Then I took everything from the "R" of REG through to the last "f" of your batch file and saved it in a Notepad file on my desktop as "deleteoffline.bat".  I then ran (double-clicked) that.  It looked like it ran successfully (no error messages) but when I look in the registry the new key is not there.

    Does the fact I'm running Win7 RTM x64 make a difference?

    Thursday, September 24, 2009 5:18 PM
  • Ignore my previous post.  I wasn't running the batch file as Administrator.  All fixed now - offline cache deleted.  Many thanks for the steer.
    Thursday, September 24, 2009 6:06 PM
  • Extra tip: add a Restore Point before doing this. A little error here can result in a unbootable system. a BSOD that repeats every time you boot. Luckily I had a recent restore point. Well at least I got a little practice with Startup Repair :)


    • Proposed as answer by dP21 Tuesday, June 15, 2010 3:57 PM
    Monday, October 26, 2009 9:52 PM
  • hi the way i did it is disable Offline Files then reboot then take ownership of the c:\windows\csc folder + subfolders then delete it. then open up the commandline then use 'mklink /d "C:\Windows\CSC" "D:\CSC"' (create a symbolic link) then re enable Offline Files then reboot.
    • Proposed as answer by LasseSaari Friday, March 26, 2010 9:15 PM
    Tuesday, March 9, 2010 8:59 AM
  • Shaun62L solution was the easyest. The only difference I did is rather than taking ownership of the c:\windows\csc I opened cmd as admin and deleted the c:\windows\csc directory then ran mklink /d "C:\Windows\CSC" "D:\CSC"

    Friday, July 23, 2010 7:46 PM
  • Why is it that after I ran the 'mklink' command I encountered the error "Cannot create a file when that file already exists."

    I'm using Windows 7 64bit.

    Monday, July 26, 2010 7:39 PM
  • Why is it that after I ran the 'mklink' command I encountered the error "Cannot create a file when that file already exists."

    I'm using Windows 7 64bit.


    you should delete the d:\csc folder beforehand. mklink will create the folder for you.
    Tuesday, August 17, 2010 6:38 PM
  • This is all crap. Microsoft should just add the damn "BROWSE" button and let me select the location for offline files. - so annoying. seems like a basic feature to me. Instead they spend time offering 6 zillion language packs - who cares? URGH!
    Thursday, February 3, 2011 6:09 AM
  • Hi, I just like to ask if I do a migration of my offline files to a new location, does the disk usage of all offline files increases? These is the thing that's holding me back because I plan to create offline files larger than 73GB limit.
    Thursday, November 3, 2011 8:42 AM
  • This being a really old post, thought I'd include this.

    http://support.microsoft.com/kb/937475


    Shawn May ~ MCSE Principal Architect & CEO DTS Inc.

    Wednesday, June 18, 2014 1:26 PM
  • Thanks. Great help.
    I've changed the location of the cache from Windows\csc to C:\
    Now. 
    HOW TO GET RID OF THOSE STUPID NESTED THOUSAND FOLDERS???? Like:
    "V2.0.6\namespace\name of my so called server\c\"
    What the hell is v2.0.6?????????????????????????????????????????

    I WANT TO GET RID OF THIS WHOLE FCKN GARBAGE and have ONLY the name of the synced folder.
    Can it be done?
    Thank You.

    Sunday, April 19, 2015 12:18 AM
  • Shaun's trick worked like a charm for me...mod this man up,folks! 
    Tuesday, September 20, 2016 1:50 PM
  • if you have the problam with can't deletet windows\csc folder, you may have to stop the cscservice in task manager>service. if this not working, run the services.msc, fine the offline fles>startup type, change the setting from automatic to diasble, after reboot, it should be ok to delete. then you can go mklink..., don't foeget the final move is to resetting back the offline services from disable to automatic.
    Friday, January 13, 2017 3:45 AM