RoboCache for Windows offline files cache management

I’ve written before about RoboCache, a command line utility I wrote for managing the offline files cache in Windows Vista, Windows 7, and now Windows 8. After using the utility internally for a few years, I decided that I might as well clean it up and make it available to the rest of you. RoboCache is now available at the ManuSoft web site. There is a shareware version available, and you can purchase the registered version at the ManuSoft store (cost is 25 USD for a single user license).

It’s nothing fancy, but it works great for my needs. The command syntax is modeled after the ROBOCOPY command, and is designed for handling an entire directory tree recursively, filtering files and folders by wildcard. My typical use case is running it from a batch file to pin remote Visual Studio project files on my laptop before travelling. Visual Studio project folders contain a lot of temporary build files and output files that don’t need to be (and therefore shouldn’t be) included in the cache. The goal is to pin only the necessary files, ignoring the ones that are not needed or will be recreated when the project is built. Here’s a sample call to recursively pin all files in the ‘Build’ folder (this is all one line in a batch file executed from the laptop):

ROBOCACHE Build /op:pin /s /xd debug* release* x64 Win32 .svn _* obj bin ipch /xf *.log *.tlog *._ls *.ncb *.user *.suo *.aps *.ilk *.pch BuildLog.htm *.err *.dmp *.pdb !*.bat #*.bat *.chm *.dia *.aps *.lnk *.Res.dll *.zip *log.txt *report.txt *.winmerge *.sdf *.opensdf

Programmers might notice that the /xd (ignore directories) and /xf (ignore files) wildcard lists look very similar to what one might encounter in a Subversion commit script. In fact, when I created the batch file I just copied and pasted from my SVN ignore lists. For me, the benefit of using RoboCache in this way is that only the minimum needed files are cached. After working on the cached files while I’m out of the office, my changes automatically sync to the folders on my desktop when I return to the office. I do use Subversion repositories for all my projects, and could just as well commit my remote changes to the repository, then update my desktop from the repository; however by using the offline files cache, the syncing all happens automatically and I never have to think about it.

RoboCache can do more than just pin and unpin files. It can perform any of ten operations on the target files (or any of four administrative functions on the files cache itself), including some operations that are not exposed through the Windows user interface. Below is a list of all currently supported operations (captured from the help screen, and not showing the available command line options for each operation).

/OP:cmd :: OPeration to perform (default is /OP:info).
:: info : display status info about the target(s)
:: pin : assure offline availability
:: unpin : unpin the target(s)
:: sync : synchronize cached files with remote files
:: rename : rename cached item (requires reboot)
:: delete : delete cached item
:: suspend : suspend the target folders (ignores files)
:: unsuspend : unsuspend the target folders (ignores files)
:: online : transition to online state
:: offline : transition to offline state
:: enable : enable offline files cache (ignores target)
:: disable : disable offline files cache (ignores target)
:: encrypt : encrypts offline files cache (ignores target)
:: decrypt : decrypts offline files cache (ignores target)

The installer simply adds RoboCache.exe to your system folder; no folders are created and no other changes are made. The shareware version of RoboCache displays a nag notification balloon in the system tray, but is otherwise completely functional. There is no separate documentation, however ROBOCACHE /? displays syntax and command options.

Windows offline files

Do you use the Windows offline files feature? I asked this question of some IT/CAD administrator types at Autodesk University last week, and was surprised to find that most didn’t even know what it was. In fact, of the dozen or so people I asked, only one actually used the feature.

There are enterprise solutions that perform similar functions (and cost a lot more), so some of you may not have much need for the feature that has been included in the box since Windows 2000, but I’ll bet that a lot of you would use it if you knew why you needed it.

If you ever need to access remote files from a local network or beyond, you can benefit from the offline files feature. In it’s simplest form, the feature allows you to continue accessing offline files when your network connection is slow or unavailable. It does this by caching copies of your files locally, and automatically keeping the remote and local copies synchronized in the background. If your data is on the cloud, offline files are your shelter from the storm.

For example, it’s common for AutoCAD installations to access configuration files stored on a network server shared by everyone in the organization. If these files are made available offline, the user can continue working on local drawing files without interruption even when the network is completely offline. In fact, if the network is slow or inaccessible for any reason, using offline files will allow the user to continue working as if the network was still perfectly functional.

The UI for offline files has been made very simple (right-click on a remote file in Explorer and select ‘Always available offline’), but there is more power and potential optimization under the hood of this feature. If you’d like to get technical, this TechNet article gives you a taste of the nitty gritty details.

So, do you already use offline files? If so, and especially if you also use RoboCopy, I’d like to hear from you. I use the offline files feature all the time, and I’ve developed a command line utility called RoboCache to manage offline files in Windows Vista and later. I’m looking for a few people to test the utility.

[Update: RoboCache has now been released.]