Category Archives: System Recovery

Restoring ‘lost’ offline files

So… I was working quite happily on a project I kicked off lastnight, and Visual Studio defaults to saving your project data in “My Documents”. In my particular environment, this is syncronized with Offline Files to a network share.

Feeling pretty pleased with myself I logged in in the morning to take another look but then realised I had to quickly shut down the system. Something went wrong with the syncronization – it didn’t happen.

Getting to work, all of lastnights files were missing as the sync must have happened in the opposite direction(!)
Later on in the day after I’d given up hope and begun to think about how quickly I could rewrite the app, the “Offline Folders” window pops up and in it I see my source files… with “Only local copy exists” (where?)

A bit of googling/headscratching later and I found that you can restore these files.

using csccmd.exe “Client-Side Caching Command-Line Options command-line tool” (!) you can extract files with the status “Only local copy exists” with the following command:

csccmd.exe /extract /target:restoredirectory /recurse /onlymodified

This will scan through the offline files and restore them to a directory of your choice. I’m thinking that other versions of your files or archived offline files must be stored in some kind of binary locally, as a Google Desktop search revealed not a trace of the sourcefiles I was looking for.

….Lesson in this is to commit to Subversion, even if you’ve just started something or don’t think there’s much to put in there yet….

With thanks to JacksonTechnical